LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How can I copy a directory and it's contents with CLI? (https://www.linuxquestions.org/questions/linux-general-1/how-can-i-copy-a-directory-and-it%27s-contents-with-cli-164179/)

CyberLord_7 03-30-2004 10:53 AM

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

jsokko 03-30-2004 10:57 AM

errr... you can use the -r tag for recursive...

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


CyberLord_7 03-30-2004 11:35 AM

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.


All times are GMT -5. The time now is 06:47 PM.