Linux diary (Exercise record): gzip, bzip2 & tar
Use the-c parameter to output the compressed content to the screen, and use the-v output compression ratio to create a compressed file with redirection:
Use the-d parameter to decompress the package. You can see the results after compression and decompression:
The-k parameter does not overwrite the source file. -Zsung directly adds the suffix ".bz2" after the name:
Display result:
Use-v to output compression information. Use-f to forcibly overwrite the file:
-J indicates compression,-c Indicates creating a new file,-v indicates the specific progress,-p indicates the Save permission, and-f indicates the newly created file, which is in the/etc folder.
View the compression result:
View the compressed file name. If the parameter-v is added, you can view the detailed information of the compressed file:
Create a folder:
Decompress the package to the New Folder: