Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to copy the contents of ~/old contents to ~/new without the ~/old directory itself

However when I do

cd ~/new
cp ../old ~/new


cd ~
cp -vr ~/old ~/new


cp -vr ~/old/ ~/new/

the /old directory itself also gets copied but I just want its contents (including its own subdirectories), not the old directory itself 'inside' new

share|improve this question

migrated from Apr 1 '13 at 5:35

This question came from our site for professional and enthusiast programmers.

shell scripting is programming, just as much as say, javascript is. However, you'll probably get a better answer on ServerFault. –  gbjbaanb Mar 31 '13 at 13:23

2 Answers 2

up vote 2 down vote accepted


cp ~/old/* ~/new

sorry can't test this now, but you want to copy the contents to the new directory, and I want to fill up the answer with the minimum 30 characters :)

share|improve this answer
Yes this worked. –  Michael Durrant Mar 31 '13 at 13:25

This worked:

$ cd ~/old
$ cp -r * ../new
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.