Go Back   TechArena Community > Software > Operating Systems
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , , , ,

Sponsored Links



How to unzip multiple files at once in Linux?

Operating Systems


Reply
 
Thread Tools Search this Thread
  #1  
Old 30-12-2009
Waffle's Avatar
Member
 
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....
Reply With Quote
  #2  
Old 30-12-2009
linux.'s Avatar
Member
 
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.
Reply With Quote
  #3  
Old 30-12-2009
Waffle's Avatar
Member
 
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?
Reply With Quote
  #4  
Old 30-12-2009
Lillebror's Avatar
Member
 
Join Date: Apr 2008
Posts: 3,259
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.
Reply With Quote
  #5  
Old 30-12-2009
shahid khan's Avatar
Member
 
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
Reply With Quote
Reply

  TechArena Community > Software > Operating Systems


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to unzip multiple files at once in Linux?"
Thread Thread Starter Forum Replies Last Post
WinRAR command line to unzip files in multiple directories jymoo Software Development 1 05-10-2011 01:37 PM
Unzip files are blocked by the windows 7 security Meena89 Windows Security 4 28-12-2010 11:08 PM
Windows won't unzip zip files. Says it's blocked. Thomas Thomassen Windows Security 16 15-07-2009 10:31 AM
Replace a string in multiple files Linux ADISH Tips & Tweaks 0 27-06-2009 11:07 AM
How to copy multiple files to multiple destination at a time Aaryn Windows Software 3 14-05-2009 11:25 AM


All times are GMT +5.5. The time now is 02:30 AM.