How to compress uncompress view files using Linux commands bzip2 bunzip2 and bzcat
Compressed files occupy less disk space and download faster than large, uncompressed files. The Linux bzip2 command has better compression ratio compared with Linux gzip command.
To create a compressed file using Linux bzip2 command, use the following command. The first command will create a compressed bzip2 file with bz2 extension, removing the uncompressed file and second command will create a compressed bzip2 file with bz2 extension keeping the uncompressed file.