0

As the title, suppose I have a set of files in a folder. Is it possible to compress every of them in separate files? Something like

7z *
0

as an example to compress every individual .jpg
cd dir/

for f in `ls -1 *.jpg` ; 
do
     7z a  "$f.7z" "$f" ;
done

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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