# cp question



## sk8harddiefast (May 11, 2010)

I dont know why i did not ask this from the first time and i am doing it with all the other ways!!!! 
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 
	
	



```
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


----------



## tankist02 (May 11, 2010)

Pay close attention if you use 


```
cp -R /mnt/hdd/folder
```

or 


```
cp -R /mnt/hdd/folder/
```

(note the trailing '/')

From man cp:


```
-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.
```


----------



## sk8harddiefast (May 11, 2010)

Are you kidding me? P
Ok.No comments!!!!! P
I always use tab button on terminal to write faster & easier so always put / on the end by himself !I could never imagine this 
solved!!!


----------

