How can I extract about 900 7z files which are all located in the same folder and all have only one file inside in one go without doing it one by one? I am using Ubuntu 10.10. All files are located in /home/username/folder1/folder2 I would think the only way to do it is by making a bash file but have no idea on how to do it or how to get started. Can anyone help me, or at least point me in the right direction?

share|improve this question
up vote 10 down vote accepted
for arc in *.7z
do
  7zwhatever "$arc"
done
share|improve this answer
1  
7zwhatever being the extract command? – Robert Cardona Nov 25 '10 at 3:49
    
@Robert: Correct. – Ignacio Vazquez-Abrams Nov 25 '10 at 3:50
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!

share|improve this answer
1  
If you have 900 files then yeah, that will be pain. – Ignacio Vazquez-Abrams Nov 25 '10 at 4:03
7za -y x "*.7z" 

The above code worked for me

share|improve this answer

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

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

in adition to using a for loop

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

share|improve this answer

The simplest way is unzip '*.zip'.

Make sure you have the ' marks.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.