Multiple choice technology

Count the files you own in all your directories.

  1. ls -lR | grep myusername | wc -l

  2. ls -a | cnt *

  3. ls -n ~myusername

  4. ls -a

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

ls -lR recursively lists all files with ownership details. Piping to grep filters for your username, and wc -l counts the matching lines - giving the total files you own. Options B, C, and D use incorrect commands or won't count recursively.