exam questions

Exam LFCS All Questions

View all questions & answers for the LFCS exam

Exam LFCS topic 1 question 93 discussion

Actual exam question from Linux Foundation's LFCS
Question #: 93
Topic #: 1
[All LFCS Questions]

Which of the following commands changes the ownership of file.txt to the user dan and the group staff?

  • A. chown dan/staff file.txt
  • B. chown dan:staff file.txt
  • C. chown -u dan -g staff file.txt
  • D. chown dan -g staff file.txt
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
KMAV
3 months ago
Selected Answer: B
The "chown" command is used to change the ownership of a file or directory. The correct syntax for changing both the user and group ownership is "chown [user]:[group] [file]". Therefore, option B is correct as it uses the correct syntax with the colon (:) separator to specify both the user and group ownership. Option A uses a forward slash (/) instead of a colon, which is not the correct separator. Option C uses the "-u" and "-g" options to specify the user and group respectively, but it does not use the correct separator between the user and group. Option D uses the "-g" option to specify the group but it does not use the correct separator between the user and group.
upvoted 1 times
...
Borbz
2 years, 4 months ago
Answer B is correct. C is wrong because the correct syntax is -u=permissions and not -u permissions
upvoted 1 times
Borbz
2 years, 4 months ago
C is wrong because the correct syntax is "chmod u=username" and not "chmod -u username"
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago