Tame Your Terminal: Unmask Hidden Files with `ls -A`

Quick Tip

Tame Your Terminal: Unmask Hidden Files with `ls -A`

Challenge: When listing directory contents with the standard ls command, hidden files (those starting with a dot, like .bashrc) are not displayed by default, making it difficult to see all files in a directory.

The Solution: Use the -A option with ls to reveal all files, including hidden ones, except for the special . (current directory) and .. (parent directory) entries.

ls -A

Why it works: The -A (or --almost-all) flag tells ls to include entries starting with a dot, providing a more comprehensive view of the directory’s contents without cluttering the output with the directory navigation entries.

Pro-Tip: For an even more detailed view, including file permissions, ownership, size, and modification date, use ls -Alh. The -l for long format and -h for human-readable sizes are excellent companions to -A.

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

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted