Ubuntu – Copy files from internal hard drive to external hard drive using command line in ubuntu 14.04

14.04external-hdd

I am using ubuntu 14.04 on lenovo z510. My system hanged today and after restarting it, it went into login loop, i.e, each time I enter my password it again takes me to login screen. I tried everything I could find on the internet to solve it but I was unable to do so. I can only access virtual terminal and am a newbie in ubuntu. Someone please tell me the steps to copy files and directories from internal hard drive to external hard drive using command line.

Best Answer

One possibility would be for you to drop to the command prompt by pressing:

Ctrl+Alt+F1 (or any function key from F1 through F6).

This would bring you to a login prompt where you'd need to enter your username (press enter), then your password (press enter).

From there you'll need to connect and then mount your external hard drive to your machine following these instructions. Once you've mounted the drive, you can use the cp command to copy your files from their source to the external hard drive destination. For example:

    cp -av /home/ubuntu/Documents /media/External_Drive_Name/backup_folder/