Site icon New Generation Enterprise Linux

Stealthy File Discovery: Unmasking Hidden Files with `ls -A`

Quick Tip

Stealthy File Discovery: Unmasking Hidden Files with `ls -A`

Challenge: By default, the `ls` command doesn’t show hidden files and directories (those starting with a dot ‘.’). This can make it difficult to see all files in a directory, especially configuration files.

The Solution: Use the `-A` flag with `ls` to list all entries except for ‘.’ (current directory) and ‘..’ (parent directory).

ls -A

Why it works: The `-A` option tells `ls` to include hidden files, but intelligently omits the standard directory references, giving you a cleaner view of all actual files and subdirectories.

Pro-Tip: For an even more visually rich and tree-like directory listing that includes hidden files, consider installing and using `lsd` (e.g., `lsd -a`).

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

0 0 votes
Article Rating
Exit mobile version