Free Webmaster
Resources
outsourced web hosting support
Webmaster Resources, Free Scripts, Web Tools,  Home  ||  Scripts  ||  Purchase  ||  Tutorials  ||  Images  ||  Tools  ||  Snippets 
    Invite Friends     Feedback     Subscribe     Link To Us     Support    Templates
Espanol Francais 中文 Deutsch Portuguese Japanese தமிழ் Forums Web Hosting Internet Stats Easy Calculation FUN Games
Google Bookmark Stumbleupon Bookmark Digg Bookmark bookmark this page Facebook Bookmark

LINUX / UNIX cmd
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Introduction
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in A
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in B
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in C
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in D
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in E
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in F
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in G
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in H
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in I
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in J
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in K
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in L
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in M
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in N
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in P
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in R
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in S
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in T
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in U
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in W
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in Y
Forums Ask your doubts
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example More about Linux
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Feedback






outsourced web hosting support

Log file analyzer

bzip2 Linux Commands


Topic

What is Linux bzip2 Command?



Explanation

bzip2 COMMAND:
     bzip2 linux command is used to compress the file. Each file is replaced by a compressed version of itself with .bz2 extension.

SYNTAX:
  The Syntax is
     bzip2 [ options ] filenames

OPTIONS:
     
- c Compress or decompress to standard output.
- d Force decompression.
- z The complement to -d. Force compression.
- t Performs the integrity test. It performs a trial decompression test and prints the result.
- f Force overwrite of output file.
- k Keep the original file. dont delete the input file during compression or decompression.
- q Quiet, suppress non-essential warning messages.
- s Reduce memory usage, for compression,decompression and testing.
- v verbose mode shows the compression ratio for each file processed.
- V Displays the version of the software.
- L Displays the license terms and conditions.
- 1 Performs fast compression,creating a relatively large files.
- 9 Get the best possible compression.



EXAMPLE:
     
  1. To Compress a file using bzip2:

    Lets have a text file as an example.

    
    $ ls -l
    -rw-rw-r--  1 hiox hiox 9150000 Sep 26 18:37 hiox.txt
    
    $ bzip2 -c -1 hiox.txt > hiox.txt.bz2
    $ ls -l
    -rw-rw-r--  1 hiox hiox 9150000 Sep 26 18:37 hiox.txt
    -rw-rw-r--  1 hiox hiox   17706 Sep 27 12:38 hiox.txt.bz2
    

    From the above example it is clear that the filesize is reduced from 9150000 bytes to 17706.

    When the File is reduced with option -9 the filesize still gets reduced.
    
    $ bzip2 -c -9 hiox.txt > hscripts.txt.bz2
    
    $ ls -l
    -rw-rw-r--  1 hiox hiox 9150000 Sep 26 18:37 hiox.txt
    -rw-rw-r--  1 hiox hiox   17706 Sep 27 12:38 hiox.txt.bz2
    -rw-rw-r--  1 hiox hiox    2394 Sep 27 13:01 hscripts.txt.bz2
    

    When the file is compressed with -1 the size was 17706 bytes and now the filesize is 2394 bytes. The 9 makes best compression but the default is 6.







        Find LINUX Commands... Hope you enjoy this tutorial. We welcome your Valuable feedbacks or suggestions on this LINUX / UNIX cmd reference. This is a copyright content.


privacy policy     license     sitemap
© 2004-2010 HIOX INDIA - hioxindia.com

Other Links