LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   cp command (https://www.linuxquestions.org/questions/linux-newbie-8/cp-command-262449/)

stresshead 12-04-2004 06:50 AM

cp command
 
I want to copy my home folder to a usb key so i can reinstall my os (fedora 3). A colleague at work has helped me with this before but I can't remember the parameters of the cp command that he told me to type. I think there were 4 in total and the only 1 i can remember is R to copy subdirectories. Can anybody give me any ideas on the other 3.

Thanks in advance,

Lee.

masand 12-04-2004 07:39 AM

hi

to copy a sub directory i think "r" will be only reqired
also why don't u have a look at

man cp

regards

adam-red 12-04-2004 08:10 AM

I think the syntax is:

cp --r <source> <destination>

but cp --help should show you all the options. Remember the directory/filename is case-sensitive.

wmakowski 12-04-2004 08:16 AM

A nicer way to do this would be to use cp -a /home/* <destination>. This not only copies recursively but retains date and time information along with owners and permissions. You might also consider creating a tar file of /home which would put all your data into a single file (very nice).

Bill


All times are GMT -5. The time now is 01:15 AM.