Skip to content

Instantly share code, notes, and snippets.

@ariesmcrae
Created December 8, 2018 03:50
Show Gist options
  • Save ariesmcrae/86f8d5d4dc67d05bc42adfbe993910f2 to your computer and use it in GitHub Desktop.
Save ariesmcrae/86f8d5d4dc67d05bc42adfbe993910f2 to your computer and use it in GitHub Desktop.
Bash command line unzip (extract using 7z) all zip files into folder (directory) where folder name is the name of zip file
#!/bin/sh
for zip in *.zip
do
dirname=`echo $zip | sed 's/\.zip$//'`
7z x $zip -o./$dirname
done
@ariesmcrae
Copy link
Author

Useful when you have a large zip file in Synology NAS where Synology uses 7z.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment