PDA

View Full Version : Processing multiple files in a directory



PompeyBlue
22nd December 2008, 07:41 PM
Hello,

I have a directory of .7z files and want to extract all of them. How do you do that under linux ? 7za e * doesn't seem to work. Is there something like:

for each file in . 7za e file ?

PompeyBlue
22nd December 2008, 08:05 PM
Found a way to do:

for file in * ;
do
7za e $file;
done;

or as one command line:

for file in *; do 7za e $file; done;

Vector
22nd December 2008, 10:53 PM
Thanx for the tip, i may just use that to mass transcode videos :D

stevea
22nd December 2008, 11:07 PM
When it's not in one directory ....

find /home/you -name '*.7z' -exec 7za e {} \;