Unmasking Hidden Files: The `ls -A` Trick

Quick Tip

Unmasking Hidden Files: The `ls -A` Trick

Challenge: By default, the `ls` command doesn’t show files and directories that start with a dot (‘.’), which are often used for configuration files and hidden directories.

The Solution: Use the `-A` flag with `ls` to reveal all files, including hidden ones, except for ‘.’ (current directory) and ‘..’ (parent directory).

ls -A

Why it works: The `-A` flag tells `ls` to list all entries except for ‘.’ and ‘..’ which are always excluded by default to prevent infinite loops in some recursive operations.

Pro-Tip: For a more detailed view including permissions, ownership, and size, combine it with the `-l` flag: `ls -lA`

Linux Tips & Tricks | © ngelinux.com | 5/5/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments