Question

How can I extract about 900 7z files which are all located in the same folder (all have only one file inside) without doing it one by one?

I am using Ubuntu 10.10. All files are located in /home/username/folder1/folder2.

Was it helpful?

Solution

for arc in *.7z
do
  7zwhatever "$arc"
done

OTHER TIPS

7za -y x "*.7z" 

The above code worked for me

for f in *.7z
do
    7zr e "$f" &
done

This will extract all .7z files if they're 7z format to the current directory, without waiting for completion.

Your computer could be owned. You have been warned!

Using parallel is rather convenient way with total progress meter for free ;)

ls *.7z | parallel -j+0 --eta '7z x {} >/dev/null'

7z x "*.7z" this worked for me in ubuntu

If you wish to extract multiple 7zip archives to folders with the same names in Linux, you can use:

for archive in *.7z; do 7z x -o"`basename \"$archive\" .7z`" "$archive"; done

For example, if you have two 7zip archives a.7z and b.7z, it will create two folders a and b, and uncompress a.7z into folder a and b.7z into folder b.

The above command comes from this answer on superuser by user Vojtech.

in adition to using a for loop

you can also use find in combination with the exec argument or xargs

The simplest way is unzip '*.zip'.

Make sure you have the ' marks.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top