Site icon New Generation Enterprise Linux

Unmasking Hidden Files with `ls -A`

Quick Tip

Unmasking Hidden Files with `ls -A`

Challenge: When you use `ls` to list directory contents, it conveniently hides files and directories that start with a dot (e.g., `.bashrc`, `.config`). This keeps your output clean, but sometimes you need to see these “hidden” files.

The Solution: Use the `-A` (or `–almost-all`) flag with `ls`.

ls -A

Why it works: The `-A` option tells `ls` to list all entries except for `.` (current directory) and `..` (parent directory). This is often more useful than `ls -a` (which includes `.` and `..`) when you just want to see hidden files without the navigational clutter.

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

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

0 0 votes
Article Rating
Exit mobile version