I know that gzip compress a file, but I would want to know. How to compress a list of files, each file in their own GZIP file ?
I need to use the list of a folder: ls log.2011 And for each file create a zipped file.
Any ideas ?
|
I know that gzip compress a file, but I would want to know. How to compress a list of files, each file in their own GZIP file ? I need to use the list of a folder: ls log.2011 And for each file create a zipped file. Any ideas ? | |||||
feedback
|
|
This will output a gz archive for each matching file, files are replaced by the archive:
Have a look to the '-r' flag too. | ||||
|
feedback
|
|
For example
to recursively walk the log.2011 directory and compress all files it finds, or
to compress only the files in the log.2011 directory without descending into subdirectories. | |||
|
feedback
|