Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- find . ! -name "*.zip" -type f -print0 | parallel -0 -N 5 zip arch{#} {}
- The option -N 5 limits the number of files to 5 per archive and is presented to zip in place of {}
- The {#} (verbatim, not to be replaced by you during the invocation), is replaced by the job number, resulting in arch1.zip, arch2.zip etc.
- The -print0 option to find and -0 option to parallel in tandem make sure that filenames with special characters are correctly handled.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement