Skip to content

Instantly share code, notes, and snippets.

@efenfauzi
Last active August 21, 2020 15:47
Show Gist options
  • Save efenfauzi/0ad42262d3b0d079cfd28009e31b6602 to your computer and use it in GitHub Desktop.
Save efenfauzi/0ad42262d3b0d079cfd28009e31b6602 to your computer and use it in GitHub Desktop.

unzip

for i in *.zip; do 
   unzip -o "$i" -d "${i%%.zip}"; 
done

unrar

1.install unrar

sudo apt-get install unrar
  1. extract foreach folder
for i in *.rar; do 
    mkdir "${i%%.rar}"; 
    unrar x -r "$i" "${i%%.rar}"; 
done 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment