Multiple choice technology operating systems

How to find all the only hidden file in the dir?

  1. ls

  2. ls -s

  3. ls -a

  4. ls -a .*

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

The ls -a command lists all files in a directory including hidden files (those starting with .). While the question phrasing 'only hidden file' is awkward, ls -a is the standard command for viewing hidden files. Plain ls shows only visible files, ls -s shows sizes, and ls -a .* would only list hidden items starting with dot in the current directory.