Which command is used to remove the read permission of the file 'note' from both the group and others?

  1. chmod go r note

  2. chmod go rw note

  3. chmod go-x note

  4. chmod go-r, 4-x note


Correct Option: D

AI Explanation

To answer this question, we need to understand the chmod command and its options.

The chmod command is used to change the permissions of a file or directory. The permissions include read, write, and execute permissions for the owner, group, and others.

In this question, we want to remove the read permission for both the group and others from the file 'note'.

Let's go through each option to determine the correct command:

Option A) chmod go r note - This option sets the read permission for both the group and others. It does not remove the read permission. Therefore, this option is incorrect.

Option B) chmod go rw note - This option sets both the read and write permissions for both the group and others. It does not remove the read permission. Therefore, this option is incorrect.

Option C) chmod go-x note - This option removes the execute permission for both the group and others from the file 'note'. It does not remove the read permission. Therefore, this option is incorrect.

Option D) chmod go-r, 4-x note - This option removes the read permission for both the group and others from the file 'note'. It uses the symbolic mode of the chmod command. The 'go-r' part removes the read permission, and the '4-x' part is invalid syntax. Therefore, this option is incorrect.

The correct answer is A. chmod go r note. This option is correct because it removes the read permission for both the group and others from the file 'note'.

Find more quizzes: