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....
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....
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.
Unzip doesn't allow many filenames as input. However there are more ways to achive it, try following:
If above command doesn't works then try te following:Code:for file in `dir *.zip` do unzip $file done
After the unzip command make sure you keep the space at the end of the line.Code:ls *.zip | xargs -n1 unzip
Unzip allows the multiple filenames using single quote and by using shell for loop .
Using single quote:
Note that *.zip should be in between single quotes, so it won't be consider as a wild card character.Code:$ unzip ‘*.zip’
Using shell for loop :
Code:$ for z in *.zip; do unzip $z; done
Bookmarks