RHEL Linux - Red Hat System Administration Practice Exam

Access More Questions
'[root@serverX~]$ tar cjf /root/logbackup.tar.bz12 /var/log' What will this command do?
Correct Answer:
create a bzip2-compressed archive of /var/log
Explanation:
The command provided is using the `tar` utility, which is commonly used for creating archives in Linux. The specific flags in the command are crucial for understanding its functionality. The `c` flag indicates that the command is creating an archive, the `j` flag specifies that the archive should be compressed using bzip2, and the `f` flag allows you to specify the name of the archive file that will be created. The output file specified is `/root/logbackup.tar.bz12`, and since bzip2 compression is indicated by the `j` flag, this command will create a bzip2-compressed archive of the contents of the directory `/var/log`. Thus, the correct answer reflects that the primary operation of this command is to compress the specified directory using bzip2, resulting in a more efficient storage format compared to uncompressed versions. Knowing about the other options provides context: gzip is indicated by the `z` flag, which is not present in this command, and zip is a different compression format that is not managed by tar. Additionally, a non-compressed archive would not use the `j` flag, as this flag indicates compression. Therefore, the nature of the flags confirms that the command creates a b

Access more questions from this quiz

Continue to RHEL Linux - Red Hat System Administration Practice Exam for more practice questions and the full quiz experience.

Access More Questions