Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-04-2004, 06:50 AM   #1
LQ Newbie
Registered: Dec 2004
Posts: 1

Rep: Reputation: 0
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,

Old 12-04-2004, 07:39 AM   #2
LQ Guru
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69

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

man cp

Old 12-04-2004, 08:10 AM   #3
Registered: Oct 2004
Location: Manchester, UK
Distribution: openSUSE 11.2
Posts: 63

Rep: Reputation: 15
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.
Old 12-04-2004, 08:16 AM   #4
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 25, 26, RHL 5.2
Posts: 560

Rep: Reputation: 56
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).


Last edited by wmakowski; 12-04-2004 at 08:22 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a single command to list all hardware installed (command line)? davee Linux - Hardware 6 02-28-2009 07:19 PM
Require Linux/Perl equivalent command for windows Command alix123 Programming 7 08-19-2005 02:23 AM
Key stroke/command to shut down x and go into the command prompt screen? Fear58 Linux - General 1 07-14-2004 07:14 PM
Command to display whole filestructure hierarchy f/ command line? mjewell Linux - Newbie 10 01-19-2004 10:48 AM
Where is Command line utility for Cups and command tutorial mossy Linux - Software 8 01-16-2004 12:24 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:55 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration