How do you move all files (including hidden) from one directory to another?
225
votes
12
answers
243644
views
How do I move all files in a directory (including the hidden ones) to another directory?
For example, if I have a folder "Foo" with the files ".hidden" and "notHidden" inside, how do I move both files to a directory named "Bar"? The following does not work, as the ".hidden" file stays in "Foo".
mv Foo/* Bar/
Try it yourself.
mkdir Foo
mkdir Bar
touch Foo/.hidden
touch Foo/notHidden
mv Foo/* Bar/
Asked by Cory Klein
(19341 rep)
Jan 24, 2011, 07:18 PM
Last activity: Mar 11, 2024, 08:10 AM
Last activity: Mar 11, 2024, 08:10 AM