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

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 u to denote the user (owner), + to add permissions, and x for execute. This grants execute permission exclusively to the file owner without modifying permissions for group or others. Option D is incorrect because the + operator adds permissions without removing existing ones for other users.

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

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

Result: Execute permission is added only for the owner. No other permissions are affected or removed. This matches option A exactly.