RHEL Linux - Red Hat System Administration Practice Exam

Disable ads (and more) with a membership for a one time $4.99 payment

Study for the RHEL Linux - Red Hat System Administration Exam. Enhance your knowledge with flashcards and multiple-choice questions, complete with hints and explanations. Prepare for your certification!

Practice this question and more.


For tar to be able to archive the selected files, it is mandatory that the user executing the tar command be able to ______ the file(s).

  1. read

  2. write

  3. execute

  4. link

The correct answer is: read

When using the tar command to create an archive, it is essential that the user has read permissions for the files they wish to include in the archive. This is because tar needs to access the contents of the files in order to copy them into the archive. If the user does not have read permission, the tar command will fail to access and thus will not be able to archive those files. The focus here is on the fundamental principle of file permissions in Linux. The read permission allows for the content of files to be accessed and displayed, which is critical for archiving purposes. While write permissions can be necessary for creating or modifying files and directories, they are not required for simply reading from files to create an archive. Execution permissions pertain to scripts and binaries, enabling them to be run as programs, whereas linking is related to creating references to files, which does not impact the ability to archive. Thus, it is the read permission that is mandatory for the successful execution of the tar command to archive selected files.