There are lots of compression tools available in Linux and you just need to install them according to your needs. you can install tar and zip command when not found. You can also use this for file compression in Linux and see how to view the content compress the file.
How To View The Content of Compressed Files On Linux:
|Compression tool||File Extension||Decompression tool|
I have created a folder and a few files which I moved into the folders. I compressed this folder with a .tar extension.
If you want to see the content of this compressed file, just use the below commands
tar -tvf touch.tar
In a similar way, you can use for all extensions like tgz, tar.gz.
I will create the Zip file folder to compress it using zip -r touch.zip touch and simply use unzip to extract.
You can view the content using zip -sf touch.zip
If 7z command not found, you need to install the package p7zip. You can find this in epel-release packages.
7z touch.7z touch
Bzip2 and Bunzip2 Command
You can also use bzip2 compression tool for files.
To expand the files use bunzip2 file.bz2
Gzip and Gunzip Commands
You’re done. tar command install file compression in linux zip command not found how to compress