LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   USB key transfer (https://www.linuxquestions.org/questions/linux-software-2/usb-key-transfer-497642/)

generalachoo 11-01-2006 03:28 PM

USB key transfer
 
How do I transfer files to a USB key in the linux console!! I have no GUI. I am using Ubuntu server edition.

Thanks!

Chromezero 11-01-2006 04:02 PM

Well, generally, you need to mount the USB drive first. Then copy the files over, as you would normally. So it would be something like...
Code:

mount /dev/sda1 /media/usb
cp files.files /media/usb/destination_folder

Keep in mind, you also need to have an entry in your /etc/fstab....

generalachoo 11-01-2006 06:21 PM

Hmm

So if i wanted to transfer the folder

/home/john/ on the computer to the usb stick what would be the syntax? I do not get the .files thing.

Thanks a lot!

Chromezero 11-01-2006 07:10 PM

Well if it's a directory, you would want to use "cp -r" like this.
Code:

cp -r /home/john/ /media/usb/
The -r means "recursive", telling it to copy everything in the directory. For the most part, doing things on a USB thumb drive are no different than doing them on your hard drive. For more information about the "cp" command, check out the man.
Code:

man cp

generalachoo 11-01-2006 11:49 PM

Thank you very much for your help. I got it to work. I like the line about thinking about it like your hdd.

Sorry if my questions seemed silly.

Chromezero 11-02-2006 09:43 AM

There's nothing wrong with asking questions. How else are you going to learn? Glad to hear it's working.


All times are GMT -5. The time now is 03:38 AM.