#37 Working with Compressed Files

Throughout the years of Unix development, few programs have been reconsidered and redeveloped more times than compress. On most Linux systems there are three significantly different compression programs available: compress, gzip, and bzip2. Each has a different suffix, .Z, .gz, and .bz2, respectively, and the degree of compression of the results can vary among the three programs, depending on the layout of data within a file.

Regardless of the level of compression, and regardless of which compression programs are installed, working with compressed files on many Unix systems requires uncompressing them by hand, accomplishing the desired tasks, and recompressing them when finished. A perfect job for a shell script! ...

Get Wicked Cool Shell Scripts now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.