[英]move all the folders and files to the folder with the same subject name in the directory Linux
[英]linux move files inside sub folder to current directory
嗨,我需要一个用于Linux和Mac OS的命令将文件从所有子文件夹移动到当前文件夹。
我有包含其他文件夹ex的主文件夹(04)。 包含jpg和其他文件的01145032。 我必须将此文件移动到04文件夹中,谢谢
您可以使用以下find
命令:
cd 04
find . -type f -mindepth 2 -exec mv '{}' . \;
-mindepth 2
将确保仅找到子目录中的文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.