Bird
0
0

What will be the output of the command ls -l file.txt after running chown bob file.txt assuming file.txt was owned by user alice before?

medium📝 Command Output Q13 of 15
Linux CLI - File Permissions and Ownership
What will be the output of the command ls -l file.txt after running chown bob file.txt assuming file.txt was owned by user alice before?
A-rw-r--r-- 1 bob users 0 Apr 1 12:00 file.txt
B-rw-r--r-- 1 alice users 0 Apr 1 12:00 file.txt
Cchown: invalid user: 'bob'
DPermission denied
Step-by-Step Solution
Solution:
  1. Step 1: Understand what chown bob file.txt does

    This command changes the owner of file.txt to user bob.
  2. Step 2: Predict the ls -l output

    The owner field will show bob instead of alice. Permissions and group remain the same.
  3. Final Answer:

    -rw-r--r-- 1 bob users 0 Apr 1 12:00 file.txt -> Option A
  4. Quick Check:

    Owner changes to bob after chown [OK]
Quick Trick: ls -l shows updated owner after chown [OK]
Common Mistakes:
  • Expecting group to change automatically
  • Thinking ownership stays the same
  • Assuming error if user exists

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes