LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 03-30-2004, 11:53 AM   #1
CyberLord_7
Member
 
Registered: Aug 2003
Distribution: Mandrake 9.1
Posts: 69

Rep: Reputation: 15
How can I copy a directory and it's contents with CLI?


I am trying to learn the Command Line Interface. I know how to use "cp" to copy files from one directory to another, but I was disappointed to discover that I cannot "cp" a directory and it's contents to another directory.
I thought everything in *nix's were files and could be treated as such.
How can I copy a directory and it's contents using the CLI?
I don't want to do a "mv" because I'm copying from a data DVD+RW I created with my Winblows box.

This brings up another question: I am running Gnome on a Mandrake 9.1 box. I have tried to copy my files using Nautilus, but while Nautilus will see the contents it will not display any size or content information, i.e. it just shows three blue dots under each item. I've got about 3GBs of data on this disk. As mentioned above, the data is on a DVD+RW. I know the CLI can read it because I can copy files off of it, but can Nautilus read a DVD+RW?

Thank you for your help
 
Old 03-30-2004, 11:57 AM   #2
jsokko
Member
 
Registered: Mar 2004
Location: Phila, PA
Distribution: SuSE 9.0 / RH 9 / Slackware 9.1
Posts: 110

Rep: Reputation: 15
errr... you can use the -r tag for recursive...

when in doubt, refer to the man. as in shellprompt~:man [command]


Last edited by jsokko; 03-30-2004 at 11:58 AM.
 
Old 03-30-2004, 12:35 PM   #3
CyberLord_7
Member
 
Registered: Aug 2003
Distribution: Mandrake 9.1
Posts: 69

Original Poster
Rep: Reputation: 15
Jsokko:
Thank you. I was tempted to try the -p flag which I know enables me to create parent directories, but I didn't know about the -r flag. I will try to remember the "man" pages in the future.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CLI copy & paste between text files? David the H. Linux - General 3 09-15-2004 01:05 PM
Need to copy OS + hard drive contents between two machines with different hardware. tayo Linux - Newbie 12 07-24-2004 11:19 AM
mv the contents of one directory to the parent directory warkrime Linux - Newbie 4 07-14-2003 08:03 PM
Copy contents of one partition to another. cparker15 Linux - Software 1 06-26-2003 02:17 PM
can i copy windows contents into linux gurpreetpall Linux - General 5 03-20-2002 04:23 PM


All times are GMT -5. The time now is 08:55 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration