nerdexam
Red_Hat

EX200 · Question #12

12. Create Archive Create a tar archive named /root/backup.tar.bz2, which should contain the contents of /usr/local. The tar archive must be compressed using bzip2. Correct Answer: See the below…

This command creates a compressed tar archive of a specified directory using bzip2 compression and saves it to the designated path.

Submitted by wei.xz· Apr 18, 2026Understand and Use Essential Tools

Question

  1. Create Archive Create a tar archive named /root/backup.tar.bz2, which should contain the contents of /usr/local. The tar archive must be compressed using bzip2. Correct Answer: See the below explanation Explanation/Reference: Solution: [root@node1 ~]# yum -y install bzip2 [root@node1 ~]# tar -jcvPf /root/backup.tar.bz2 /usr/local # Verification [root@node1 ~]# file /root/backup.tar.bz

Explanation

This command creates a compressed tar archive of a specified directory using bzip2 compression and saves it to the designated path.

Concept tested. Creating bzip2 compressed tar archives

Reference. https://www.gnu.org/software/tar/manual/html_node/bzip2-Option.html

Topics

#tar#bzip2#Archiving#File Compression

Community Discussion

No community discussion yet for this question.

Full EX200 Practice