LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 12-03-2004, 12:37 PM   #1
vbmark
Member
 
Registered: Nov 2004
Distribution: Mandrake 10.1
Posts: 59

Rep: Reputation: 15
Help with the cp command


How do I copy everything in the current directory and its subdirectories to another directory?

Could not figure it out from 'man cp'.

Thanks!
 
Old 12-03-2004, 01:06 PM   #2
reelwylde
LQ Newbie
 
Registered: Apr 2003
Posts: 24

Rep: Reputation: 15
cp -r <directory name>

the r = recursive

use p if you want to preserve permissons
 
Old 12-03-2004, 01:08 PM   #3
vbmark
Member
 
Registered: Nov 2004
Distribution: Mandrake 10.1
Posts: 59

Original Poster
Rep: Reputation: 15
Oh, I see.

I thought that I had to indicate the source files with something like in DOS like this:

cp *.* /destination

But that never worked of course.

Thanks!
 
Old 12-03-2004, 02:15 PM   #4
Crito
Senior Member
 
Registered: Nov 2003
Location: Knoxville, TN
Distribution: Kubuntu 9.04
Posts: 1,168

Rep: Reputation: 53
You still have a source and destination, just like in DOS, except instead of adding a /s (include sub-directories) option at the end you put a -R at the beginning. It's those !@#$ linux commands, like ln, that put destination before source that really !@$% me off.
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 12:07 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
Open Source Consulting | Domain Registration