Like this
find $SOURCE_DIR -type d -exec mv -f {} $TARGET_DIR \;
質問
I have a directory with files and another directory:
drwxr-xr-x 3 RORY staff 102 Mar 29 05:07 FOLDER-XYZ123
drwx------+ 23 RORY staff 782 Mar 29 04:19 ..
-rwxrwxrwx 1 RORY staff 5000000 Mar 24 21:48 setup.part1.rar
-rwxrwxrwx 1 RORY staff 1622537 Mar 24 21:48 setup.part2.rar
How can I move the FOLDER someplace else without actually knowing it's name? FOLDER-XYZ123 could be named anything, so I wouldn't know the name in advance.
解決
Like this
find $SOURCE_DIR -type d -exec mv -f {} $TARGET_DIR \;