Results 1 to 5 of 5

Thread: How to unzip multiple files at once in Linux?

  1. #1
    Join Date
    Apr 2008
    Posts
    53

    How to unzip multiple files at once in Linux?

    Hi, I want to unzip multiple files at once in Linux from console ? I know its kind of very basic question but i don't know how to do it. So please give me some hint on it. I have a Ubuntu Linux flavor. Thank you....

  2. #2
    Join Date
    Dec 2008
    Posts
    50

    Re: How to unzip multiple files at once in Linux?

    I don't remember clearly but there is command like unzip *.zip to extract multiple zip files at once, use it and see what happens.

  3. #3
    Join Date
    Apr 2008
    Posts
    53

    caution: filename not matched

    Quote Originally Posted by linux. View Post
    I don't remember clearly but there is command like unzip *.zip to extract multiple zip files at once, use it and see what happens.
    Thanks for your quick reply, this was my first guess but its gives me some error saying "caution: filename not matched" . Any more ideas how i can be done?

  4. #4
    Join Date
    Apr 2008
    Posts
    3,295

    Re: How to unzip multiple files at once in Linux?

    Unzip doesn't allow many filenames as input. However there are more ways to achive it, try following:
    Code:
    for file in `dir *.zip` do 
    unzip $file
    done
    If above command doesn't works then try te following:
    Code:
    ls *.zip | xargs -n1 unzip
    After the unzip command make sure you keep the space at the end of the line.

  5. #5
    Join Date
    Mar 2008
    Posts
    212

    Re: How to unzip multiple files at once in Linux?

    Unzip allows the multiple filenames using single quote and by using shell for loop .

    Using single quote:

    Code:
    $ unzip ‘*.zip’
    Note that *.zip should be in between single quotes, so it won't be consider as a wild card character.

    Using shell for loop :
    Code:
    $ for z in *.zip; do unzip $z; done

Similar Threads

  1. WinRAR command line to unzip files in multiple directories
    By jymoo in forum Software Development
    Replies: 1
    Last Post: 05-10-2011, 12:37 PM
  2. Replies: 4
    Last Post: 11-06-2011, 04:23 PM
  3. Windows won't unzip zip files. Says it's blocked.
    By rasena in forum Windows Security
    Replies: 7
    Last Post: 15-07-2009, 09:31 AM
  4. Replace a string in multiple files Linux
    By ADISH in forum Tips & Tweaks
    Replies: 0
    Last Post: 27-06-2009, 10:07 AM
  5. Replies: 3
    Last Post: 14-05-2009, 10:25 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,503,634.68410 seconds with 17 queries