Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I Have a directory say abc in var/www/ on my server

Now i want to move all the content of abc/ directory to var/www/

What will the linux command for this. New bie in linux

share|improve this question
great question. thank you – dino Jul 23 '11 at 15:50
up vote 2 down vote accepted


I understand that you want to move content of /var/www/abc to /var/www, right?

Then do

mv /var/www/abc/* /var/www

This will omit files with names starting with . (a dot). If you have any (check it with ls -l /var/www/abc) you can do

mv /var/www/abc/.* /var/www

Ignore the errors about "." and "..".

share|improve this answer
and great answer here.. thanks – dino Jul 23 '11 at 15:52

Assuming the directory you are referring to is /var/www,

Something like this will work:

mv /var/www/abc/* /var/www

This will move everything in /var/www/abc/ into the /var/www/ directory. This will leave the /var/www/abc/ directory where it is but it will be empty.

Be aware that what you wrote (var/www) is a relative directory rather than the absolute path from root (/) - so it means relative from your current working directory. If this is what you actually wanted, drop the leading slashes in the source and target directories.

You can read more about the options for the mv (move) command by running:

man mv

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.