通过shell命令从一个文件夹中随机挑选一批文件添加到另一文件夹
find /data/test_10000 -type f | shuf -n 3000 | while read file; do # 使用 cp 命令将文件复制到新目录中 cp "$file" /data/test_3000 done
将上述代码保存到一个以.sh命名的文件中 然后bash执行即可