Thursday, November 17, 2011

Basic commands used in Linux ( Compression and decompression )

In linux command line interface is the most important part. Apart from the GUI command line interface does a really good job. We can use command line interface to do many customizations in a linux environment. I hope to write as many as I can… Remember to remove the quotes in them before using .

1)   1) “bzip filename” – compresses or decompresses a file
2)    2)“tar cf targer.tar filename1 filename2 filename3” – Includes filename1, filename2, and filename3 ( as much as you like ) and make a zipped file target.tar
3)    3)“tar xf filename.tar” – Extracts files from a tar zipped file
4)    4)“tar czf target.tar.gz filename” – create a tar file with Gzip compression
5)    5)“tar xzf file.tar.gz” – extracts a tar gz zipped file
6)    6)“tar cjf target.tar.bz2 filename” –create a tar file using Bz2 compression
7)    7)“tar xjf file.tar.bz2” – Extracts a tar Bz2 compressed file
8)    8)“gzip filename” – Create compress file and rename it to filename.gz
9)    9)“gzip –d filename.gz” – Extracts filename.gz

Enough for today :)


Post a Comment

Keep a comment if you like this.. Thank you :)