Site icon New Generation Enterprise Linux

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

Quick Tip

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

Challenge: By default, the `ls` command hides files and directories that start with a dot (‘.’), which are often used for configuration files. Sometimes you need to see these hidden items.

The Solution: Use the `-A` (or `–almost-all`) option with `ls` to display all files, including dotfiles, except for ‘.’ (current directory) and ‘..’ (parent directory).

ls -A

Why it works: The `-A` flag modifies `ls`’s behavior to include entries that begin with a period, providing a more comprehensive view of your directory’s contents without cluttering the output with the default ‘.’ and ‘..’ entries.

Pro-Tip: For an even more detailed, tree-like view including hidden files, combine it with the `-l` (long listing) and `-R` (recursive) options: `ls -lAR`

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

0 0 votes
Article Rating
Exit mobile version