How to recursively move all files (including hidden) in a subfolder into a parent folder in *nix?
In Bash (and some others), you can use brace expansion to accomplish this in one line:
mv bar/{,.}* .
The comma separates a null and a dot, so the mv
command sees filenames that match *
and .*
This one harvests all files from subfolders and moves them to current dir
find . -type f -exec mv -iv \{} . \;
If You want to owerwrite files with same name, use
yes y | find . -type f -exec mv -iv \{} . \;