Tech notes

Daily notes about my IT activities.

2013-01-27

Extract a number of zip and rar archives

by hackprime

sudo apt-get install unzip unrar
for x in *.zip; do unzip -o "$x" -d "${x//\.zip}" ; done
for x in *.rar; do unrar x "$x" ; done

Sources:

  1. How to unzip multiple files (encrypted) in a directory. — The UNIX and Linux Forums
  2. bash replace all matches of regex substring in string