要移动名称中包含该单词的文件:
find /path/to/dir1 /path/to/dir2 /and/so/on -type f -iname "*heavengames*" \
-exec mv -t /path/to/heavengames-threads {} \+
Run Code Online (Sandbox Code Playgroud)
要移动正文中包含 word 的文件:
find /path/to/dir1 /path/to/dir2 /and/so/on -type f -exec grep -q heavengames {} \; \
-exec mv -t /path/to/heavengames-threads {} \+
Run Code Online (Sandbox Code Playgroud)
附:要检查一切是否正确,请在第一次运行时添加echobefore 。mv