Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个包含 500 个文件的数据集,我想将其分成 5 个文件夹,每个文件夹 100 个文件。我想将前 100 个复制到一个文件夹中,比如 Folder1。这我可以使用 find . -maxdepth 1 -type f -print0| head -z -n 500 | xargs -0 -r -- cp -t Folder1
find . -maxdepth 1 -type f -print0| head -z -n 500 | xargs -0 -r -- cp -t Folder1
但是对于接下来的 101 到 200 个文件,我无法使用head或tail来完成。有什么建议么?