OA. free
Free
Accenture Core Computer Science Core Computer Science Medium

Q15 /20 In UNIX-like OS, which is the correct meaning of the command chmod u+x foo?

Accenture technical mcq question, verified with a worked answer. Free to practise - no sign-up.

In UNIX-like OS, which is the correct meaning of the command chmod u+x foo?

Choose one option.
Show answer & explanation
Answer: A. Give execute permission to owner of the file named foo

The chmod u+x foo command uses symbolic notation where u represents the user (owner), + means add permission, and x means execute. This adds execute permission only to the file owner without modifying permissions for group or others. Option D is incorrect because chmod u+x does not remove permissions from other users—it only adds to the owner's permissions.

Step-by-step Derivation:
Breaking down chmod u+x foo:

  • chmod: change mode command
  • u: user (owner) of the file
  • +: add operator
  • x: execute permission
  • foo: filename

Result: Execute permission is granted to the owner only. Group (g) and others (o) permissions remain unchanged. Option A correctly states this behavior.