I want to unzipped all the files from the specific directory but dont know how to do it using shell script.
Lgl_Entitiy.txt.zip
Lgl_Entitiy.txt_1.zip
Lgl_Relate.txt.zip
Lgl_Relate.txt_1.zip
Lgl_Name.txt.zip
Lgl_Name.txt_1.zip
CodePudding user response:
Install unzip:
sudo apt install
unzip or yum install unzip
Use this in the same directory you want to unzip the files:
unzip ‘*.zip’
If you want to put the uncompressed files in other directory, then use this:
unzip ‘*.zip’ -d /usr/sampleZip/ExampleDir
CodePudding user response:
you can use simple unzip command.
Let me give you an example:
- go into the directory where you have the zip files.
cd /home/rexter/test
- there are few zip files in this location.
ls
1.zip
2.zip
3.zip
- now if you want to unzip them all just type:
unzip '*.zip'
And its done!