1

Last night I decided to update my Ubuntu 14.04. When the update finished I decided to reboot. When I did I got stuck in a login in loop. So, I came here to the board to look for answers. I found this link and tried some of the solutions to no avail. Ubuntu gets stuck in a login loop

Before I go any further I would like to save my files via cli to an external harddrive. I have a Seagate FreeAgent external harddrive that I want to put my downloads, pictures, documents, etc. What are the command lines that I need to know in order to do this?

If anyone has a solution to the login loop problem I would love to hear it. This is pretty frustrating to see my files right there and not be able to access them.

2 Answers2

1

From a command line prompt use the copy command. You need the path to your USB device.

Syntax

cp source destination
cp dir1 dir2
cp -option  source destination
cp -option1 -option2  source destination

From your question, you want

cp -r /home/username/Documents /usb_backup_destination
cp -r /home/username/Downloads /usb_backup_destination

and, so on for each directory you wish to copy.

If you need to find the path to your USB backup device, run

sudo blkid

The output for your device will be listed after all the HDD's an usually starts with sdb

/dev/sdb1: UUID="36C9-BC77" TYPE="vfat" PARTUUID="e10284e8-01"

with one line for each partition. The UUID, without quotes, will be needed to identify the target destination for your copy command. Your destination usually mounts as:

/media/<your_username/<your_sbd>

So, your copy command should look like this.

cp -r ~/Downloads /media/<your_username>/device_UUID
RCF
  • 2,127
0

cp item directory is how you copy files into a directory. If you want to copy a directory, make sure to use the -r argument. Type in man cp for more info.