Re: Replacement for unzip of .7z compressed files.
- In reply to: Ernie Luzar : "Re: Replacement for unzip of .7z compressed files."
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 21 Mar 2022 20:58:45 UTC
> Problem is how do I get the extracted file into a different directory? > I have a directory named DL with 5 different named .7z files and want to have > the unzipped version go to another directory named UZ with the 5 .7z files > having the same file names minus the .7z extension. for f in DL/*.7z do tar -x -C UZ -f $f done or maybe for f in DL/*.7z do tar -x -f $f -O > UZ/$(basename $f .7z) done If you want to rename the extracted file ths -s flag might do the trick. Regards, John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies", Please consider the environment before reading this e-mail. https://jl.ly