Often times when moving files from one directory to another, specifically when dealing with web folders, I have missed out the all important .htaccess hidden files with just the usual `mv source/* destination` command.
Here's a one liner that will include the hidden files too:
$ ls -A <source> | while read i; do mv <source>/"$i" <destination>; done











Nice tip
Thanks for this nice tip, I just "recover" from a unfortunate "mv *" on my home directory where I almost lost all my "hidden" files and folders because the bash wildcart did not include them.
I found another way to manage hidden file/folders: you can activate their inclusion in the environment with this command:
shopt -s dotglob
All the best,
Post new comment