Q. I’ve lots of files in a directory called /disk2/images. All files are zip file format , so I am using following command:
Which is result into an error as follows:
caution: filename not matched
How do I unzip multiple / many files under Linux?
A. Linux or UNIX unzip command will list, test, or extract files from a ZIP archive, commonly found on MS-DOS systems.
When you want to unzip file using wild card, you have two options as follows.
Option # 1 : unzip multiple files using single quote (short version)
Type the command as follows:
$ unzip ‘*.zip’
Note that *.zip word is put in between two single quote, so that shell will not recognize it as a wild card character.
Option # 2 : unzip multiple files using shell for loop (long version)
You can also use for loop as follows:
$ for z in *.zip; do unzip $z; done
See alsoTwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!
- 30 Cool Open Source Software I Discovered in 2013
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012
- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop