cp question

I dont know why i did not ask this from the first time and i am doing it with all the other ways!!!! :p
i have a folder with 50 files(example)
I want to copy a folder named skate from /mnt/hdd /home/george
But when i make
Code:
cp -R /mnt/hdd/skate/ /home/george
he copies the 50 files inside /home/george but not in folder skate.He throw them inside /home/george and even create the folder skate to put them inside.
So the question is.How to copy a folder with all files,subdirectories etc?
It sounds so silly question :(
 
Pay close attention if you use

Code:
cp -R /mnt/hdd/folder

or

Code:
cp -R /mnt/hdd/folder/

(note the trailing '/')

From man cp:

Code:
-R    If source_file designates a directory, cp copies the directory and
           the entire subtree connected at that point.  If the source_file   
           ends in a /, the contents of the directory are copied rather than 
           the directory itself.
 
Are you kidding me? :pP
Ok.No comments!!!!! :pP
I always use tab button on terminal to write faster & easier so always put / on the end by himself !I could never imagine this :p
solved!!!
 
Back
Top