1. Linux disk and file system Management --not learned
2. common compression commands for Linux systems
2.1 Common Compressed file extensions *.tar, *.tar.gz, *.tgz, *.gz, *. Z, *.bz2
*. Z Compress program compressed files, obsolete;
*.gz gzip program compressed files;
*.BZ2 bzip2 program compressed files;
*.tar the TAR program to package the data, and has not been compressed;
*.tar.gz tar program packaged files, which are also compressed by gzip
*.TAR.BZ2 tar program packaged files, which are bzip2 compressed
2.2 gzip [-cdtv#] File
-C: Output compressed data to the screen, can be processed through data flow redirection;
-D: the extracted parameters;
-T: can be used to verify the consistency of a compressed file ~ See if there are errors;
-V: can display the original file/compressed file compression ratio and other information;
-#: Compression level, 1 the fastest, but the worst compression, 9 slowest, but the best compression! Default is-6
Example: Gzip-v pafa.log compression
gzip-d pafa.log.gz Decompression
Gzip-c pafa.log > pafa.log.gz Compress and keep the original file
Zcat file. gz
Example: Zcat pafa.log.gz Read Compressed file contents
bzip2 [-cdkzv#] File
-C: Output the data generated by the compression process to the screen!
-D: decompressed parameters
-K: retains the original file without deleting the original file Oh!
-Z: Compressed parameters
-V: can display the original file/compressed file compression ratio and other information;
-#: Same as gzip, all in the calculation of compression ratio parameters,-9 best,-1 fastest! 6, yes.
Example: Bzip2-z pafa.log compression
bzip2-d pafa.log.bz2 Decompression
Linux Learning Notes