Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unzip All Files In A Directory

I have a directory of ZIP files (created on a Windows machine). I can manually unzip them using unzip filename, but how can I unzip all the ZIP files in the current folder via the shell?

Using Ubuntu Linux Server.

like image 879
Lennie De Villiers Avatar asked Mar 03 '10 20:03

Lennie De Villiers


People also ask

How do I extract all files in a directory?

Open File Explorer and find the zipped folder. To unzip the entire folder, right-click to select Extract All, and then follow the instructions. To unzip a single file or folder, double-click the zipped folder to open it. Then, drag or copy the item from the zipped folder to a new location.

How do I unzip all files in a directory in Python?

To unzip a file in Python, use the ZipFile. extractall() method. The extractall() method takes a path, members, pwd as an argument and extracts all the contents. To work on zip files using Python, we will use an inbuilt python module called zipfile.

How extract all zip files in Linux?

Sometimes we need to unzip multiple zipped and rar'ed files at once, all in a single folder. In the Ubuntu user interface, this is pretty easy: you just have to select all the files you want to unzip, right-click on them and use the Extract option to unzip them all.


2 Answers

This works in bash, according to this link:

unzip \*.zip

like image 146
ChristopheD Avatar answered Oct 18 '22 17:10

ChristopheD


Just put in some quotes to escape the wildcard:

unzip "*.zip" 
like image 29
ghostdog74 Avatar answered Oct 18 '22 18:10

ghostdog74