# cp command



## sniper007 (Jan 7, 2009)

Hi,

I'm curious how can use cp command to copy also the first folder. 
Example:

Have *bash* folder and within this folder have 5 files. I would like copy bash folder(and also all 5 files) to *bash2* folder

so: bash2-->bash-->files

if i use only 





> cp bash bash2



then situation looks like:

bash2-->files

I hope so you know what i mean


----------



## graudeejs (Jan 7, 2009)

cp -R bash bash2


----------



## sniper007 (Jan 7, 2009)

nope, copy recursively is not solution for my problem


----------



## graudeejs (Jan 7, 2009)

cp -R bash bash2/
[I'm not at unix atm, but i think this should work, if i understand you]


----------



## gnemmi (Jan 7, 2009)

Here you go:


```
[gonzalo@inferna ~]% mkdir test
[gonzalo@inferna ~]% cd test/
[gonzalo@inferna ~/test]% mkdir bash bash2
[gonzalo@inferna ~/test]% cd bash
[gonzalo@inferna ~/test/bash]% touch 1 2 3 4
[gonzalo@inferna ~/test]% ls bash
1  2  3  4
[gonzalo@inferna ~/test]% ls bash2
[gonzalo@inferna ~/test]% cp -R bash bash2/
[gonzalo@inferna ~/test]% ls bash
1  2  3  4
[gonzalo@inferna ~/test]% ls bash2/bash/
1  2  3  4
[gonzalo@inferna ~/test]%
```

Ps: yes it does killasmurf86, I was just testing at the same time that you was poting XD 
you were right


----------



## sniper007 (Jan 8, 2009)

huh, sorry killasmurf86r my mistake it's works.

Thank you both


----------

