How do I move all folders and its contents from a directory A to another directory B, skipping all files in Directory A ?
---------- Post updated at 12:53 PM ---------- Previous update was at 12:42 PM ----------
Ok. Got it.
mv /A/*/ /B/
How do I move all folders and its contents from a directory A to another directory B, skipping all files in Directory A ?
---------- Post updated at 12:53 PM ---------- Previous update was at 12:42 PM ----------
Ok. Got it.
mv /A/*/ /B/
The * globbing cannot distinguish between files and directories.
You need another step.
Here the directories are collected in a sub command:
mv $(find /A/* -prune -type d) /B/
--
Oh yes, the /A/*/ trick works, too!