Posts

Showing posts from May, 2015

No Dual-Boot Option after Installing Ubuntu 14.04 x64

I guess, There is a problem with your grub. So you need to re-install grub. Check this for full detail about   boot-repair. For you 1st Option will be useful.   The easiest way to use Boot-Repair is to burn one of the following disks and boot on it. Boot-Repair-Disk   is a CD starting Boot-Repair automatically. Boot-Repair is also included in   Linux-Secure-Remix . Remark : you can also install the ISO on a   live-USB   (eg via   UnetBootin   or   LiliUSB   or   Universal USB Installer) .  plz go to https://help.ubuntu.com/community/Boot-Repair

error no such partition entering rescue mode grub rescue

error: no such partition Entering rescue mode... grub rescue>    If you have ubuntu live cd, boot from cd and click try ubuntu  Then find terminal window Type sudo apt-get install lilo and then sudo lilo -M /dev/sda mbr (you should have internet connection to perform this) then restart If you do not have internet follow this on latest ubuntu live cd's sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda  

How to extract line from the file on specific condition in linux

Method #1 Since you only are interested in lines if they have more than 2 characters separated by commas you could just  grep  for commas: $ grep "," sample . txt chr2 3323 C T , A chr3 5251 C T , G chr3 9990 G C , T Method #2 You could use  grep 's PCRE facility. This is where  grep  can use Perl's regular expression engine to do the matching. It's quite powerful and lets you do a lot of what you can do with Perl from  grep . loosely defined $ grep - P "(\w,)+" sample . txt strictly defined $ grep - P '\w+\d\s+\d+\s+\w\s+(\w,)+' sample . txt Method #3 Using  awk . This again is taking advantage of the fact that only the lines with a comma ( , ) are of interest, so it just finds them and prints them: loosely defined $ awk '/,/{print}' sample . txt more strictly defined $ awk '/([[:alpha:]])+,[[:alpha:]]/{print}' sample . txt even more strictly def

Install Perl Modules Manually

Install Perl Modules Manually Download Perl module Go to CPAN Search   website and search for the module that you wish to download. In this example, let us search, download and install XML::Parser Perl module. I have downloaded the XML-Parser-2.36.tar.gz to /home/download # cd /home/download # gzip -d XML-Parser-2.36.tar.gz # tar xvf XML-Parser-2.36.tar # cd XML-Parser-2.36 Build the perl module # perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for XML::Parser::Expat Writing Makefile for XML::Parser # make # make test Install the perl module # make install This is very simple for one module with no dependencies. Typically, Perl modules will be dependent on several other modules. Chasing all these dependencies one-by-one can be very painful and annoying task. I recommend the CPAN method of installation as shown below. Use the manual method only if the server is not connected to the Internet.

What command do I need to unzip/extract a .tar.gz file?

Type man tar for more information, but this command should do the trick: tar -xvzf community_images.tar.gz   To explain a little further, tar collected all the files into one package, community_images.tar . The gzip program applied compression, hence the gz extension. So the command does a couple things. f : this must be the last flag of the command, and the tar f ile must be immediately after. It tells tar the name and path of the compressed file. z : tells tar to decompress the archive using g z ip x : tar can collect files or e x tract them. x does the latter. v : makes tar talk a lot. V erbose output shows you all the files being extracted.

How to delete a non-empty directory in Terminal

rm -rf lampp   It deletes all files and folders contained in the lampp directory. Add sudo at the beginning of the command : In case user doesn't have the permission to delete the folder: sudo rm -rf folderName Otherwise, without sudo you will be returned permission denied. And it's a good practice to try not to use -f while deleting a directory: sudo rm -r folderName   Note: this is assuming you are already on the same level of the folder you want to delete in terminal, if not: sudo rm -r /path/to/folderName   FYI: you can use letters -f , -r , -v : -f = to ignore non-existent files, never prompt -r = to remove directories and their contents recursively -v = to explain what is being done

youtube-dl – download Youtube videos from linux command Line

Image
Installation of youtube-dl from the terminal Open the the terminal type the below command #  sudo apt-get install youtube-dl Downlaod Videos using youtube-dl Step1 : Go to youtube website and search the video that you want to download Step:2 Copy the Video URL from the browser’s navigation(address) bar . Open the terminal  type below Command : # youtube-dl <video URL> Example: # youtube-dl https://www.youtube.com/watch?v=9mmF8zOlh_g Download Videos in the format of your Choice # youtube-dl -F  {video URL} Example : # youtube-dl -F  https://www.youtube.com/watch?v=9mmF8zOlh_g Suppose You want to download ‘mp4′ format , then  use the below Command # youtube-dl -f  {format code} {video URL} So as per above ouput mp4 format code is 18. # youtube-dl -f  18  https://www.youtube.com/watch?v=9mmF8zOlh_g Download list of videos using youtube-dl To download a list of video files,  first create a file & place all the video urls  that you want to

teamviewer download for ubuntu 14.04 64 bit

cd ~/Downloads wget http://download.teamviewer. com/download/version_9x/ teamviewer_linux.deb sudo apt-get install gdebi sudo gdebi ~/Downloads/teamviewer_linux. deb

Error mounting /dev/sda2 at /media

Error mounting /dev/sda2 at /media/debo/2290657790655279: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sda2" "/media/debo/2290657790655279"' exited with non-zero exit status 14: Windows is hibernated, refused to mount. Failed to mount '/dev/sda2': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.       The problem is exactly what it says. If your windows has not properly shutdown, Ubuntu would not mount it in read write mode as writing to the disk may corrupt it. You can however mount it in read only mode using the command: sudo mount -o ro /dev/sda2 /media/folder