Use tar to decompress a specified file in the compressed package. First, check the files in the compressed package. For example, the compressed package name is a.tar.bz2.
[Root @ localhost Home] # tar-jtvf a.tar.bz2 (check the files in the package)
Drwxr-XR-x root/root 0 2008-09-09 :55/
-RW-r -- root/root 21 2008-09-09 A/222
-RW-r -- root/root 12 2008-09-09 A/111
-RW-r -- root/root 10 2008-09-09 A/333
We can see that there are 111, 222, 333, and files.
The following command is used to decompress the 333 file separately.
[Root @ localhost Home] # tar-jxvf a.tar.bz2 A/333 (decompress the package 333 separately)
A/333
[Root @ localhost Home] # LL (check if no folder a exists)
Total 32
Drwx ------ 4 11 11 4096 09-09 11
Drwxr-XR-x 2 root Root 4096 09-09
-RW-r -- 1 Root 188 09-09 18:37 a.tar.bz2
Drwx ------ 2 root Root 16384 2006-12-25 lost + found
[Root @ localhost Home] # cd a (go to the folder)
[Root @ localhost A] # LL (display content)
Total 4
-RW-r -- 1 Root 10 09-09 17:54 333
The 333 file has been decompressed separately.