Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Linux compressed document 01

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Compression, decompression and archiving tool compress/uncompress:.Z (early Compression tool) gzip/gunzip:.gz bzip2/bunzip2:.bz2 xz/unxz:.xz (highly recommended) zip/unzip tar Cpio 1, gzip/gunzip (compression ratio is not very high, but relatively fast) # gzip FILE (compression) will delete the original file only the compressed file # gunzip FILE (decompress) will delete the compressed file gizp [OPTION]. FILE...-d: decompress, equivalent to gunzip-c: output the result to standard output, and will not manipulate the source file [root@localhost ~] # gzip-c passwd > passwd.gz (keep the original file)-#: 1-9 Specify the compression ratio zcat does not display the expanded premise to view the contents of the text file [root@localhost ~] # zcat passwd.gz 2, bzip2/bunzip2/bzcat can only compress the file, not the directory bizp2 [OPTION]. FILE... The use of gzip is the same, but a larger compression ratio-k keep retains the source file-d performs decompression bzcat: view the contents of the text file without displaying the expansion 3, xz/unxz/xzcat xz [option...] [file...]-k keep keep the source file-d perform decompression xzcat: view the contents of the text file without displaying the expansion. 4. Zip Compression [root@localhost ~] # zip pam.d.zip pam.d/* decompression [root@localhost ~] # unzip pam.d.zip Note: the name after decompression is still the name before decompression 5, tar tar [OPTION]. FILE... (1) create archive tar-c-f / PATH.TO?SOMEFIE.tar FILE... (2) View the list of files in the archive file tar-t-f / PATH.TO?SOMEFIE.tar (3) expand and archive tar-x-f / PATH.TO?SOMEFIE.tar-C / PATH/TO/DIR combined with the compression tool: archive and compress -J:xz [root@localhost ~] # tar-Jcf pam.d.tar.xz pam.d/

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report