Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have the following structure on my server:


I want to copy the content (all files) from the last www to html and delete the second www after that. How do I have to do that?

share|improve this question

migrated from stackoverflow.com Sep 11 '10 at 2:10

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

3 Answers 3

sudo cp /www/html/www/* /www/html/


sudo rm -r /www/html/www
share|improve this answer
I am getting an error, if I sue the command. the error says, that the file or directoty could noz be found. I Used thsi command: –  chris Sep 10 '10 at 19:33
sudo cp /www/html/www/* /www/html/ –  chris Sep 10 '10 at 19:39

In sh:

mv /www/html/www/* /www/html/ && rmdir /www/html/www
share|improve this answer

I recommend rsync:

sudo rsync -avz /www/html/www/ /www/html/

It's what I use to create backups. It syncs files on copy when copying across different hard drives, -a takes care about file access rights and ownership. When copying across servers, -z uses compression.

After that, delete the dir:

sudo rm -f /www/html/www
share|improve this answer

Your Answer


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