LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 12-04-2004, 07:50 AM   #1
stresshead
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,

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

Rep: Reputation: 58
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
 
Old 12-04-2004, 09:10 AM   #3
adam-red
Member
 
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, 09:16 AM   #4
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 24, 25, 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).

Bill

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


Reply


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 08:19 PM
Require Linux/Perl equivalent command for windows Command alix123 Programming 7 08-19-2005 03:23 AM
Key stroke/command to shut down x and go into the command prompt screen? Fear58 Linux - General 1 07-14-2004 08:14 PM
Command to display whole filestructure hierarchy f/ command line? mjewell Linux - Newbie 10 01-19-2004 11:48 AM
Where is Command line utility for Cups and command tutorial mossy Linux - Software 8 01-16-2004 01:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:56 AM.

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