Skip to content

Instantly share code, notes, and snippets.

@RagingTiger
Created May 8, 2023 03:21
Show Gist options
  • Save RagingTiger/7beb02e35d18ad199b74f14f778960df to your computer and use it in GitHub Desktop.
Save RagingTiger/7beb02e35d18ad199b74f14f778960df to your computer and use it in GitHub Desktop.
Split a directory of 1000 files into 10 directories of 100 files.
for number in $(seq 1 10); do mkdir "Part_${number}" && mv "$(ls *.mp4 | head -n 100)" "Part_${number}"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment