Lpic 2 Linux Engineer · Free Practice Question Medium
Question 5
- A mkfs.iso9660 -o backup.iso /backup
- B mkisofs -o backup.iso -J -R /backup
- C mkswap -o backup.iso /backup
- D tar -czf backup.iso /backup
Reveal correct answer
Correct answer: B
A. The command "mkfs.iso9660" is used to create a filesystem on a device, not to create an ISO image. It is not the correct command for creating an ISO image of a directory.
B. The command "mkisofs" is used to create an ISO image from files and directories. The options "-o backup.iso -J -R" specify the output file name as backup.iso and include Joliet and Rock Ridge extensions for better compatibility with different operating systems. This command is the correct choice for creating an ISO image of the /backup directory.
C. The command "mkswap" is used to set up a Linux swap area. It is not related to creating an ISO image of a directory, so it is not the correct command for this scenario.
D. The command "tar -czf" is used to create a compressed archive of files and directories. While it can create a compressed archive, it does not create an ISO image suitable for burning to a CD-ROM. Therefore, it is not the correct command for creating an ISO image of the /backup directory.
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
