Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 superuser.com/questions/62141/… –  Pere May 13 '12 at 18:03

1 Answer 1

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

 
discard

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.