Which command lists all files in a directory including hidden ones?
The -a flag makes ls include entries beginning with a dot, which are hidden by default, so it lists all files including hidden ones as the stem requires. Plain ls omits dotfiles entirely, and -l only changes output format, not visibility.
Why this answer
`ls -a` lists all directory entries including those beginning with a dot (hidden files such as `.bashrc`, `.git`, `.ssh`). The `-a` flag is shorthand for 'all' and overrides the default behavior of suppressing dotfiles. It is the standard way to reveal hidden content in a directory.
Exam trap
The trap is that `-h` looks like it could mean 'hidden', but in `ls` it actually means 'human-readable' — candidates confuse the two flags.
How to eliminate wrong answers
Option A is wrong because `ls -h` means 'human-readable' — it formats sizes as K/M/G but does not show hidden files. Option B is wrong because `ls -l` produces a long listing with permissions and metadata but still omits dotfiles unless combined with `-a`. Option C is wrong because `dir -hidden` is a Windows CMD construct, not a valid Linux command syntax.