Unmask Hidden Files with `ls -A`

Quick Tip

Unmask Hidden Files with `ls -A`

Challenge: You need to list all files and directories in a directory, including those that start with a dot (hidden files), without listing the special ‘.’ (current directory) and ‘..’ (parent directory) entries.

The Solution: Use the `ls -A` command.

ls -A

Why it works: The `-A` option for `ls` displays all entries except for ‘.’ and ‘..’. This is often more useful than `ls -a` which includes these special directory entries.

Pro-Tip: Combine `ls -A` with `-l` for a detailed listing of hidden files: `ls -Al`

Linux Tips & Tricks | © ngelinux.com | 6/24/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted