Posts Tagged With: compress

Archive all files with a given extension

Tagged with: , , , , ,

Find all files with ‘.log’ extention and make an bzip archive


find /var/log -name '*.log' | tar cv --files-from=- | bzip2 > log.tar.bz2
No Comments »

Decompress Bzip2 File

Tagged with: , , , , , , , ,

Decompress a compressed tar archive in bzip2


tar -xvfj archive.tar.bz2tar -xvfj archive.tar.bz2
No Comments »

Create a Bzip2 File

Tagged with: , , , , , ,

create a tarball compressed into bzip2


tar -cvfj archive.tar.bz2 dir
No Comments »

Extract to Given Folder

Tagged with: , , , , ,

extract a tarball into / tmp


tar -xvf archive.tar -C /tmp
1 Comment »

Uncompressing a BZ2 File

Tagged with: , , , , ,

Decompress a file called ‘file.bz2′


bunzip2 file.bz2
No Comments »

Uncompressed Tarball

Tagged with: , , , ,

Create a uncompressed tarball


tar -cvf archive.tar file
No Comments »

Using Rar in Linux

Tagged with: , , ,

Create an archive rar called ‘file.rar’


rar a file.rar test_file
No Comments »

RAR Support In Linux

Tagged with: , , , , , , ,

RAR Support in Linux is easy - just install the unrar tool…


sudo yum install unrar
No Comments »

Compress PHP Output from .htaccess

Tagged with: , , ,

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


php_value output_handler ob_gzhandler 

No Comments »

Packaging a Subversion Project

Tagged with: , , , , ,

This is the method that I use to package a SVN Project. For CVS projects, the code is slightly different. Please note that the second line requires bash to work.

This is how I packaged nexty


svn checkout https://nexty.svn.sourceforge.net/svnroot/nexty
find nexty/ -name .svn -exec rm -rf {} \;
tar -czf nexty.tar.gz nexty/
rm -rf nexty/
No Comments »