Tag: compress

Zip Command in Linux

Command to create a zip file from a given folder. zip -r File.zip Folder/

Archive all files with a given extension

Find all files with ‘.log’ extention and make an bzip archive find /var/log -name ‘*.log’ | tar cv –files-from=- |…

Decompress Bzip2 File

Decompress a compressed tar archive in bzip2 tar -xvfj archive.tar.bz2tar -xvfj archive.tar.bz2

Create a Bzip2 File

create a tarball compressed into bzip2 tar -cvfj archive.tar.bz2 dir

Extract to Given Folder

extract a tarball into / tmp tar -xvf archive.tar -C /tmp

Uncompressing a BZ2 File

Decompress a file called ‘file.bz2’ bunzip2 file.bz2

Create Compressed Tarball

Create a compressed tarball tar -czf archive.tar file_name

Using Rar in Linux

Create an archive rar called ‘file.rar’ rar a file.rar test_file

RAR Support In Linux

RAR Support in Linux is easy – just install the unrar tool… sudo yum install unrar

Compress PHP Output from .htaccess

Compress all PHP output by adding this line to .htaccess file php_value output_handler ob_gzhandler