Decompress a specified file in the compressed package using tar

Source: Internet
Author: User

 

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.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.