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 tried to move all files inside a directory to another directory like this:

$ mv /directory_one/* /directory

However, the hidden files (such as .htaccess) in /directory_one won't be moved.

What is the right command to do so?

share|improve this question
See… – Pere May 13 '12 at 18:03
up vote 6 down vote accepted

This should do it:

mv /directory_one/* /directory_one/.* /directory

It will move regular files and dotfiles.

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.