File Compression and Packing

Keywords: Operation & Maintenance network yum less CentOS

File Compression and Packing

Look at this post: http://ask.apelearn.com/question/5435

1. Introduction to Compression Packaging

It is well known that the compressed files occupy less disk space, and because the size of the compressed files decreases, the speed of transmission through the network is faster, and the occupation of network bandwidth resources is reduced.

The network in the server room is different from that in the home. Generally, the network of the server is peer-to-peer. Home network only has fast download speed and slow upload speed, so the network bandwidth of server room is more expensive. Compressing files is one of the ways to save bandwidth resources.

In Linux, the suffix name of a file can be defined arbitrarily, but it is better to follow the usual format to define the suffix of a file, which is conducive to distinguishing and identifying files.

2. gzip compression tool

Note: gzip cannot compress directories, only files

  • Create a d6z / directory under / tmp / and append all the files ending in. conf to 1.txt with the find command
[root@sc ~]# cd /tmp/  
[root@sc tmp]# cd d6z/
[root@sc d6z]# ls
#Down and forth1.txt Added content to view file size
[root@sc d6z]# find /etc/ -type f -name "*conf" -exec cat {} >>1.txt \; (Repeat many times)
[root@sc d6z]# du -sh 1.txt
2.2M	1.txt
[root@sc d6z]# wc -l 1.txt 
31986 1.txt
  • For example, I use gzip to compress a 1.txt file
[root@sc d6z]# gzip 1.txt       #gzip compression command
[root@sc d6z]# ls
1.txt.gz                        #Compressed files
[root@sc d6z]# du -sh 1.txt.gz 
316K	1.txt.gz                # Compressed file size
  • Gzip-d decompresses 1.txt file

Because this file has some virtual space before compression, the size of the file after compression and decompression is different, just like a sponge.

[root@sc d6z]# gzip -d 1.txt.gz  #Unzip command
[root@sc d6z]# ls
1.txt
[root@sc d6z]# du -sh 1.txt 
1.3M	1.txt
[root@sc d6z]# wc -l 1.txt 
31986 1.txt
  • gzip can specify the compression level, a total of 1-9 levels, the default is 6 levels, 1 level is the least rigorous compression, so the compressed files are larger, but the consumption of cpu resources is relatively small. 9 is the most rigorous compression, but it consumes more cpu resources. Generally, the compression level is default.
[root@sc d6z]# gzip -1 1.txt 
[root@sc d6z]# du -sh 1.txt.gz 
372K	1.txt.gz
[root@sc d6z]# gunzip 1.txt.gz  # This is also the decompression command
[root@sc d6z]# ls
1.txt
[root@sc d6z]# gzip -9 1.txt 
[root@sc d6z]# du -sh 1.txt.gz 
316K	1.txt.gz
  • Use the file command to view information about gizp compressed files

  • Use the zcat command to view the contents of the gizp-formatted compressed file 1.txt.gz

View the contents of the compressed package, because 1.txt.gz is a binary file, and zcat is decompressed before viewing.

[root@sc d6z]# zcat 1.txt.gz
  • From the above experiments, we can know that the original file will disappear and become a compressed file after using gzip to compress the file, but the gzip plus-c option can make the original file not disappear, regenerate a compressed file, and specify the storage path of the compressed file.
[root@sc d6z]# gzip -c 1.txt >/tmp/1.txt.gz
[root@sc d6z]# ls /tmp/1.txt.gz 
/tmp/1.txt.gz
[root@sc d6z]# file !$
file /tmp/1.txt.gz
/tmp/1.txt.gz: gzip compressed data, was "1.txt", from Unix, last modified: Wed Mar 27 15:50:08 2019
  • Relative decompression can do the same.
[root@sc d6z]# gzip -d -c /tmp/1.txt.gz >/tmp/d6z/2.txt
[root@sc d6z]# wc -l 1.txt 2.txt 
  31986 1.txt
  31986 2.txt
  63972 Total dosage
[root@sc d6z]# du -sh *.txt
1.3M	1.txt
1.3M	2.txt

3. bzip2 compression tool

Note: bzip2 cannot compress directories, only files

  • Compared with gzip, this bZIP tool compresses more severely, which means that it consumes more cpu resources, and the compression algorithms of these two tools are different. Minimizing installation may not have this tool, you need to install it using the yum install-y bzip2 command
[root@sc d6z]# yum install -y bzip2
  • The usage of bzip2 and gzip is almost identical
[root@sc d6z]# bzip2 1.txt
[root@sc d6z]# ls
1.txt.bz2  2.txt
[root@sc d6z]# du -sh 1.txt.bz2 
132K	1.txt.bz2
[root@sc d6z]# du -sh 2.txt 
1.3M	2.txt
  • Bzip2-d is the decompression command
[root@sc d6z]# bzip2 -d 1.txt.bz2 
[root@sc d6z]# ls
1.txt  2.txt
[root@sc d6z]# bzip2 1.txt
[root@sc d6z]# bunzip2 1.txt.bz2 
[root@sc d6z]# ls
1.txt  2.txt
  • The - c option can be added to specify the storage path of the compressed file, or the decompression can be used to specify the storage path.
[root@sc d6z]# bzip2 -c 1.txt >/tmp/1.txt.bz2
[root@sc d6z]# du -sh /tmp/1.txt.bz2
132K	/tmp/1.txt.bz2
[root@sc d6z]# bzip2 -d -c /tmp/1.txt.bz2 >3.txt
[root@sc d6z]# ls
1.txt  2.txt  3.txt
[root@sc d6z]# du -sh 3.txt 
1.3M	3.txt
  • bzip2 also has compression level. It can specify compression level, which is also 1-9 compression level. The default compression level is 9, so it is not necessary to specify compression level in general.
[root@sc d6z]# bzip2 -9 1.txt 
[root@sc d6z]# du -sh 1.txt.bz2 
132K	1.txt.bz2

You can use file to view information about compressed files

[root@sc d6z]# file 1.txt.bz2 
1.txt.bz2: bzip2 compressed data, block size = 900k
  • Note: If someone does not comply with the agreement, you can also use the file command to set the end symbol blindly for the file.
[root@sc d6z]# mv 1.txt.bz2 1.txt
[root@sc d6z]# ls
1.txt  2.txt  3.txt
[root@sc d6z]# less 1.txt  # Viewing a binary file with the common command less
"1.txt" may be a binary file.  See it anyway?  # Input y







# Out of the content will display scrambling code



BZh91AY&SY<F0>(7^S^AP;<FF><E1>^?<FF>8^@^?<FF><FF>
<FF><FF><FF><FF><FF><FF><FF><FF><FF>@^@@^@^P^@b:<FE>^@<FA>*B<AA><88>"T*^@^@^A^D^T^@)
@^TP
($J<80>P^@Q@^AT(^BJ<A0><94>^@<80>^@^@^@*<80>^@<A0>^@^R^@^B<A4>
^A^D^@^T^E^@H<80>J% ^@^@^@^@
^@^@P^@^@^@^A@^@^@^@^@^@^@PP^@^@^@^@^@^@^@^@<A0>^@P
^@^@^@P^@^@^@(^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@P^@^@^@^@^@^@^@I@^@^@^@^@^@^@^@^@^@^@^@^@^@^T^@
<A0>^@^@^@^@^A ^@^@^@^@^@^@^T^T<A1>@^@@^@^@^@^@^@^@
^@^@EQ^Q@QBT^@^@^@
<A8><94>^@^@^@Q@^@^@^@^@^@^@^B<A8>^A*^B^QE^B<80>^@U* ^@^EQ <A5>(^@^@<A0>H"T*B<A8><80>^UQ^PE*^P^R<A2><92>^@<92><A8>Q"<88>U^B<92><88>^U^EH<95>^D<80>^@R<81> 
<80>RU)<AA>J<A0>^@<A0>(^B<94>^@<A4><AA>@ ^EI"<A8>
<89>B<90>
J<82><AA>^D<8A>PJ$H<8A><A2><A8><A8><A2>^U^@^T^@PTQ"
^RD<88>^HRR^AB<80>T^P^H^A^@R^R@<81>^B*JJ<8A>!<85>^E*<A4>
D^P<82><A8> <80><92>Q^@D^@^@^@^@^@^@^@^@^@^@^B<80>^@^@^@^@^@^@^@^T^@^T<A0>^@^Q"R<A8>^B<80>^@^@^@^@ <90>
<A8><92><8A>^T("^@^@U^@^@^@U^E^B<80>^@^@^@^@^HB<A5>EIP$<A0>R<80>^T<AA><8A>"<95>P)P^BR<85>"D<AA>(<A8>^@^@<A4>*^@^@^A ^U<A5>^P<94>R@<A2>T<A0><A8>)J<84><94>^RE@^@^@^BU*<80>^E) ^@^P<91>E^R^RJ^R<94>J@(A((PU^R(<85>1.txt


[root@sc d6z]# file 1.txt  # File can view the information of a binary file, showing that it is a bzip2 compressed file, which can be viewed directly with bzcat
1.txt: bzip2 compressed data, block size = 900k
[root@sc d6z]# file 2.txt 
2.txt: UTF-8 Unicode text
[root@sc d6z]# mv 1.txt 1.txt.bz2
[root@sc d6z]# ls
1.txt.bz2  2.txt  3.txt
  • The bzcat command allows you to view the contents of compressed files in bz2 format
[root@sc d6z]# bzcat 1.txt.bz2 

4. xz compression tool

Note: xz can't compress directories, it can only compress files

  • The xz compression tool is similar to the previous two compression tools, but it is not often used, but in common tar packages, you will often see the suffix tar.xz compression packages, so this tool is also to understand.

From the results of compression, we can see that the xz tool compresses files more severely than the first two tools, directly compresses to tens of k ilograms, and correspondingly consumes more cpu resources.

[root@sc d6z]# xz 2.txt
[root@sc d6z]# ls
1.txt.bz2  2.txt.xz  3.txt
[root@sc d6z]# du -sh 2.txt.xz 
48K	2.txt.xz
[root@sc d6z]# du -sh 3.txt 
1.3M	3.txt
  • The same xz tool also has a compression level, which can specify the compression level, which is also 1-9 compression level. The default compression level is 6.
[root@sc d6z]# xz -d 2.txt.xz 
[root@sc d6z]# ls
1.txt.bz2  2.txt  3.txt
[root@sc d6z]# xz 2.txt 
[root@sc d6z]# unxz 2.txt
[root@sc d6z]# unxz 2.txt.xz 
[root@sc d6z]# ls
1.txt.bz2  2.txt  3.txt
  • The - c option can be added to specify the storage path of compressed files, and the storage path of compressed files can also be specified.
[root@sc d6z]# xz -c 2.txt >/tmp/2.txt.xz
[root@sc d6z]# xz -d -c /tmp/2.txt.xz >./4.txt
  • xzcat command to view the contents of compressed files
[root@sc d6z]# xzcat /tmp/2.txt.xz
  • You can use file to view information about compressed files
[root@sc d6z]# file 2.txt.xz
2.txt.xz: cannot open (No such file or directory)

5. Summary of gzip, bzip2, xz commands

command Compressed file example Sample decompressed file Default compression level Sample of Compressed File (Source File Retention) Example of Unzipping Files (Source Files Not Retained) View the contents of compressed files The Role of Compression Tools
gzip gzip 1.txt Gzip-d 1.txt.gz or gunzip 1.txt.gz 6 gzip -c /root/1.txt >/tmp/1.txt.gz gzip -d -c /tmp/1.txt.gz >/root/1.txt zcat gzip can't compress directories, it can only compress files
bzip2 bzip2 1.txt Bzip2-d 1.txt.bz or bunzip2 1.txt.bz 9 bzip2 -c /root/1.txt >/tmp/1.txt.bz2 bzip2 -d -c /tmp/1.txt.gz >/root/1.txt bzcat bzip2 can't compress directories, it can only compress files
xz xz 1.txt Xz-d 1.txt.xz or unxz 1.txt.xz 6 xz -c /root/1.txt >/tmp/1.txt.xz xz -d -c /tmp/1.txt.gz >/root/1.txt xzcat xz can't compress directories, it can only compress files

6. zip Compression Tool

Note: zip not only compresses files, but also directories

  • Copy a directory
[root@sc tmp]# cp -r /tmp/aminglinux/ /tmp/d6z/  
[root@sc tmp]# cd d6z/
[root@sc d6z]# ls
1.txt.bz2  2.txt  3.txt  4.txt  aminglinux
[root@sc d6z]# cp 4.txt aminglinux/2/
[root@sc d6z]# du -sh aminglinux/
1.3M	aminglinux/
  • Zip supports compressing directories or files. CentOS 7, which minimizes installation, does not have this tool and needs to be installed using the yum install-y zip command
[root@sc d6z]# yum install -y zip
  • zip file compression commands are different from gzip and bZIP 2 commands, for example, I want to compress 2.txt files
[root@sc d6z]# zip 2.txt.zip 2.txt
  adding: 2.txt (deflated 75%)
[root@sc d6z]# ls
1.txt.bz2  2.txt.zip  4.txt
2.txt      3.txt      aminglinux
[root@sc d6z]# du -sh 2.txt.zip 
316K	2.txt.zip
  • Compressing directories with zip

zip compression tool has a feature that after compression, the original file will not be deleted. Other compression tools like gzip and bzip2 will be deleted after compression.

[root@sc d6z]# zip -r aming.zip 3.txt aminglinux/
  adding: 3.txt (deflated 75%)
  adding: aminglinux/ (stored 0%)
  adding: aminglinux/2/ (stored 0%)
  adding: aminglinux/2/4.txt (deflated 75%)
  adding: aminglinux/aming2/ (stored 0%)
  adding: aminglinux/aming1/ (stored 0%)
[root@sc d6z]# ls
1.txt.bz2  2.txt.zip  4.txt       aming.zip
[root@sc d6z]# du -sh aming.zip 
632K	aming.zip
  • The unzip command can be used to decompress zip compressed files. CentOS 7, which minimizes installation, does not have this command. It needs to be installed using the yum install-y unzip command.
[root@sc d6z]# yum install -y unzip
  1. Because the original file has not been deleted, when decompressing, it will be asked whether to overwrite the file. Input large A means all overwritten files, input y means (single) overwritten files, input n means (single) not overwritten files.
[root@sc d6z]# unzip aming.zip
Archive:  aming.zip
replace 3.txt? [y]es, [n]o, [A]ll, [N]one, [r]ename: A
  inflating: 3.txt                   
  inflating: aminglinux/2/4.txt  
  1. Specify the storage path of the decompressed file:
[root@sc d6z]# unzip 2.txt.zip -d test/
Archive:  2.txt.zip
  inflating: test/2.txt
  1. Note: The name of the file cannot be changed when decompressing with commands
[root@sc d6z]# unzip 2.txt.zip -d test/aa.txt
Archive:  2.txt.zip
  inflating: test/aa.txt/2.txt      
  • zip's compressed file content cannot be viewed by command, only the list of files in it can be viewed
[root@sc d6z]# unzip -l aming.zip
Archive:  aming.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
  1280892  03-27-2019 17:10   3.txt
        0  03-28-2019 10:27   aminglinux/
        0  03-28-2019 10:28   aminglinux/2/
  1280892  03-28-2019 10:28   aminglinux/2/4.txt
        0  03-28-2019 10:27   aminglinux/aming2/
        0  03-28-2019 10:27   aminglinux/aming1/
---------                     -------
  2561784                     6 files

7. tar packaging

Before introducing the use of tar tools, let's assume a scenario where server A transmits a bunch of directories and files to server B. The total size of these directories and files is 100M, and the network bandwidth of the server is 100M. In theory, 100M network equals about 12M per second, because the network bandwidth is bit. As a unit instead of byte, so 1MByte equals 8MBit. According to the network speed, it should be able to transfer in 8 seconds theoretically. But in fact, it is not. Because there are many files and directories scattered in what A server wants to transfer, it can only transfer one by one when it cannot transfer together. Row transmission, so theoretically about 8 seconds can be completed, in fact, it may take more than a minute to complete the transmission.

If the tar tool is used to package these scattered files and directories together, they can be transmitted simultaneously. Although it may not be able to complete the transmission in 8 seconds in theory, it will certainly be much faster than the scattered transmission. This is the purpose of using the packaging tool.

  • The use of tar is similar to zip, such as packaging a directory
[root@sc d6z]# tar -cvf aminglinux.tar aminglinux/
aminglinux/
aminglinux/2/
aminglinux/2/4.txt
aminglinux/aming2/
aminglinux/aming1/
  • Remove v from the package that still covers it
[root@sc d6z]# tar -cf aminglinux.tar aminglinux/
[root@sc d6z]# ls
1.txt.bz2  2.txt  2.txt.zip  3.txt  4.txt  aminglinux  aminglinux.tar  aming.zip  test
  • tar unpacking also overwrites the original file without any hints
[root@sc d6z]# tar -xvf aminglinux.tar 
aminglinux/
aminglinux/2/
aminglinux/2/4.txt
aminglinux/aming2/
aminglinux/aming1/
  • Packing directories with files
[root@sc d6z]# tar -cvf aminglinux.tar aminglinux 3.txt 4.txt 
aminglinux/
aminglinux/2/
aminglinux/2/4.txt
aminglinux/aming2/
aminglinux/aming1/
3.txt
4.txt
  • View the list of files in the tar package
[root@sc d6z]# tar -tf aminglinux.tar 
aminglinux/
aminglinux/2/
aminglinux/2/4.txt
aminglinux/aming2/
aminglinux/aming1/
3.txt
4.txt
  • Add the -- exclude option to filter the specified files
[root@sc d6z]# tar -cvf aminglinux.tar aminglinux 3.txt 4.txt 
aminglinux/
aminglinux/2/
aminglinux/2/4.txt
aminglinux/aming2/
aminglinux/aming2/2/
aminglinux/aming2/2/2.txt
aminglinux/aming2/aming1/
aminglinux/aming2/aming1/2/
aminglinux/aming2/aming1/2/2.txt
aminglinux/aming2/aming1/aminglinux/
aminglinux/aming2/aming1/aminglinux/2/
aminglinux/aming2/aming1/aminglinux/2/2.txt
aminglinux/aming1/
aminglinux/aming1/2.txt
3.txt
4.txt
[root@sc d6z]# tar -cvf aminglinux.tar --exclude aming1 aminglinux 3.txt 4.txt 
aminglinux/
aminglinux/2/
aminglinux/2/4.txt
aminglinux/aming2/
aminglinux/aming2/2/
aminglinux/aming2/2/2.txt
3.txt
4.txt
[root@sc d6z]# tar -cvf aminglinux.tar --exclude aming1 --exclude 2.txt aminglinux 3.txt 4.txt 
aminglinux/
aminglinux/2/
aminglinux/2/4.txt
aminglinux/aming2/
aminglinux/aming2/2/
3.txt
4.txt
[root@sc d6z]# tar -cvf aminglinux.tar --exclude aming1 --exclude "*.txt" aminglinux 3.txt 4.txt 
aminglinux/
aminglinux/2/
aminglinux/aming2/
aminglinux/aming2/2/

8. Target packaging and compression

  • tar is compressible when packaged, gzip example
[root@sc d6z]# tar -czvf aminglinux.tar.gz aminglinux 3.txt 4.txt 
aminglinux/
aminglinux/2/
aminglinux/2/4.txt
aminglinux/aming2/
aminglinux/aming2/2/
aminglinux/aming2/2/2.txt
aminglinux/aming2/aming1/
aminglinux/aming2/aming1/2/
aminglinux/aming2/aming1/2/2.txt
aminglinux/aming2/aming1/aminglinux/
aminglinux/aming2/aming1/aminglinux/2/
aminglinux/aming2/aming1/aminglinux/2/2.txt
aminglinux/aming1/
aminglinux/aming1/2.txt
3.txt
4.txt
[root@sc d6z]# du -sh aminglinux.tar.gz 
944K	aminglinux.tar.gz
[root@sc d6z]# du -sh aminglinux 3.txt 4.txt 
1.3M	aminglinux
1.3M	3.txt
1.3M	4.txt
  • tar is compressible when packaged, gzip decompression example
[root@sc d6z]# tar -xzvf aminglinux.tar.gz aminglinux 3.txt 4.txt 
aminglinux/
aminglinux/2/
aminglinux/2/4.txt
aminglinux/aming2/
aminglinux/aming2/2/
aminglinux/aming2/2/2.txt
aminglinux/aming2/aming1/
aminglinux/aming2/aming1/2/
aminglinux/aming2/aming1/2/2.txt
aminglinux/aming2/aming1/aminglinux/
aminglinux/aming2/aming1/aminglinux/2/
aminglinux/aming2/aming1/aminglinux/2/2.txt
aminglinux/aming1/
aminglinux/aming1/2.txt
3.txt
4.txt
  • tar is compressible when packaged, bzip2 example
[root@sc d6z]# tar -cjvf aminglinux.tar.bz2 aminglinux 3.txt 4.txt 
aminglinux/
aminglinux/2/
aminglinux/2/4.txt
aminglinux/aming2/
aminglinux/aming2/2/
aminglinux/aming2/2/2.txt
aminglinux/aming2/aming1/
aminglinux/aming2/aming1/2/
aminglinux/aming2/aming1/2/2.txt
aminglinux/aming2/aming1/aminglinux/
aminglinux/aming2/aming1/aminglinux/2/
aminglinux/aming2/aming1/aminglinux/2/2.txt
aminglinux/aming1/
aminglinux/aming1/2.txt
3.txt
4.txt
[root@sc d6z]# du -sh aminglinux.tar.bz2 
320K	aminglinux.tar.bz2
[root@sc d6z]# du -sh aminglinux 3.txt 4.txt 
1.3M	aminglinux
1.3M	3.txt
1.3M	4.txt
  • tar is compressible when packaged, bzip2 decompression example
[root@sc d6z]# tar -xjvf aminglinux.tar.bz2 
aminglinux/
aminglinux/2/
aminglinux/2/4.txt
aminglinux/aming2/
aminglinux/aming2/2/
aminglinux/aming2/2/2.txt
aminglinux/aming2/aming1/
aminglinux/aming2/aming1/2/
aminglinux/aming2/aming1/2/2.txt
aminglinux/aming2/aming1/aminglinux/
aminglinux/aming2/aming1/aminglinux/2/
aminglinux/aming2/aming1/aminglinux/2/2.txt
aminglinux/aming1/
aminglinux/aming1/2.txt
3.txt
4.txt
  • tar is compressible when packaged, xz example
[root@sc d6z]# tar -cJvf aminglinux.tar.xz aminglinux 3.txt 4.txt 
aminglinux/
aminglinux/2/
aminglinux/2/4.txt
aminglinux/aming2/
aminglinux/aming2/2/
aminglinux/aming2/2/2.txt
aminglinux/aming2/aming1/
aminglinux/aming2/aming1/2/
aminglinux/aming2/aming1/2/2.txt
aminglinux/aming2/aming1/aminglinux/
aminglinux/aming2/aming1/aminglinux/2/
aminglinux/aming2/aming1/aminglinux/2/2.txt
aminglinux/aming1/
aminglinux/aming1/2.txt
3.txt
4.txt
[root@sc d6z]# du -sh aminglinux.tar.xz 
48K	aminglinux.tar.xz
[root@sc d6z]# du -sh aminglinux 3.txt 4.txt 
1.3M	aminglinux
1.3M	3.txt
1.3M	4.txt
  • tar can be compressed when packaged. xz decompression example
[root@sc d6z]# tar -xJvf aminglinux.tar.xz 
aminglinux/
aminglinux/2/
aminglinux/2/4.txt
aminglinux/aming2/
aminglinux/aming2/2/
aminglinux/aming2/2/2.txt
aminglinux/aming2/aming1/
aminglinux/aming2/aming1/2/
aminglinux/aming2/aming1/2/2.txt
aminglinux/aming2/aming1/aminglinux/
aminglinux/aming2/aming1/aminglinux/2/
aminglinux/aming2/aming1/aminglinux/2/2.txt
aminglinux/aming1/
aminglinux/aming1/2.txt
3.txt
4.txt
  • Ta-tf View File List
[root@sc d6z]# tar -tf aminglinux.tar.gz 
aminglinux/
aminglinux/2/
aminglinux/2/4.txt
aminglinux/aming2/
aminglinux/aming2/2/
aminglinux/aming2/2/2.txt
aminglinux/aming2/aming1/
aminglinux/aming2/aming1/2/
aminglinux/aming2/aming1/2/2.txt
aminglinux/aming2/aming1/aminglinux/
aminglinux/aming2/aming1/aminglinux/2/
aminglinux/aming2/aming1/aminglinux/2/2.txt
aminglinux/aming1/
aminglinux/aming1/2.txt
3.txt
4.txt
[root@sc d6z]# tar -tf aminglinux.tar.bz2 
aminglinux/
aminglinux/2/
aminglinux/2/4.txt
aminglinux/aming2/
aminglinux/aming2/2/
aminglinux/aming2/2/2.txt
aminglinux/aming2/aming1/
aminglinux/aming2/aming1/2/
aminglinux/aming2/aming1/2/2.txt
aminglinux/aming2/aming1/aminglinux/
aminglinux/aming2/aming1/aminglinux/2/
aminglinux/aming2/aming1/aminglinux/2/2.txt
aminglinux/aming1/
aminglinux/aming1/2.txt
3.txt
4.txt
[root@sc d6z]# tar -tf aminglinux.tar.xz 
aminglinux/
aminglinux/2/
aminglinux/2/4.txt
aminglinux/aming2/
aminglinux/aming2/2/
aminglinux/aming2/2/2.txt
aminglinux/aming2/aming1/
aminglinux/aming2/aming1/2/
aminglinux/aming2/aming1/2/2.txt
aminglinux/aming2/aming1/aminglinux/
aminglinux/aming2/aming1/aminglinux/2/
aminglinux/aming2/aming1/aminglinux/2/2.txt
aminglinux/aming1/
aminglinux/aming1/2.txt
3.txt
4.txt

Posted by JamesyBHOY on Thu, 18 Jul 2019 22:33:08 -0700