Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

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 (?) , you can switch to a simple comment.
Switch to a voting comment New
KMAV
1 year 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
3 years, 1 month ago
Answer B is correct. C is wrong because the correct syntax is -u=permissions and not -u permissions
upvoted 1 times
Borbz
3 years, 1 month 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 ...