1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

SSH Help - Batch unzip

Discussion in 'Site & Server Administration' started by saadu, Feb 6, 2008.

  1. #1
    Hello All,

    I've been searching for a solution for a really long time now, and have yet to find an answer. Basically I have a folder with hundreds of .zip files (i.e. 001.zip, 002.zip... 100.zip, etc).
    I need to figure out a way to batch unzip all the files without doing it one-by-one.

    Thanks!
     
    saadu, Feb 6, 2008 IP
  2. mellow-h

    mellow-h Peon

    Messages:
    750
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #2
    As far i know, Linux zip/unzip supports wildcard with the file name. So running the following command on the directory where all the zip files are located should do your job:

    unzip *.zip
    Code (markup):
    If you want to extract them into some other directory like /root/dump then just do the following:

    unzip *.zip -d /root/dump
    Code (markup):
     
    mellow-h, Feb 6, 2008 IP
  3. saadu

    saadu Peon

    Messages:
    65
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hey,

    Thanks for the tip! But, I receive the following error when trying to unzip:
    Archive: Biomega002.zip
    caution: filename not matched: Biomega003.zip
    caution: filename not matched: Biomega004.zip
    etc...
     
    saadu, Feb 7, 2008 IP