Skip to content

Archives

Compress each file in a different 7-Zip archive

for X in *; do 7z a -t7z -mx9 "$X".7z "$X"; done

Compress each folder in a different ZIP archive

for i in */; do zip -r "${i%/}.zip" "$i"; done