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 *
tigerjack
  • 2,575
  • 7
  • 25
  • 38

1 Answers1

0

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

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