![]() |
cp directory command
I tried to copy /home/user/abcd/ to /home/user/efgh/ using the cp comand, but received the message cp: omitting directory '/home/user/agcd/'. I tried several times with and without the back slash but still got the same message.
could anyone point out what is wrong with the command? my distro is redhat 8 Thanks. |
try with -r option i.e.
cp -r /home/user/abcd/ /home/user/efgh/ cp copies files, -r tells copy to go recursivley to get all the files. |
I type:-
cp -r /home/user/abcd/ /home/user/efgh/ IT WORKED. Thanks leonscape. excellent forum for newbies. |
Just to point out mark001, it's always good to take a read over the manual pages.
So, using the above example; Code:
man cp Code:
-R, -r, --recursive Welcome to LQ.org :) -Kristijan |
Okie, after six months of using linux, I never figured out how to copy directories from the terminal. I guess when I am told to RTFM, I really must RTFM. ;) Or I can just browse linuxforum :D
|
The man pages contains lots of information about the commands and some even provide examples. You can learn a lot by going through them. Most questions are easily answer if you just look at the man page.
BTW some of the file managers/web browsers like Konquerer can handle man pages. just type Code:
man:/cp There's xman as well. Good for leisure browsing of the man pages... Gosh, I must be way too bored... |
All times are GMT -5. The time now is 01:39 PM. |