Site icon New Generation Enterprise Linux

Unmask Hidden Files with `ls -A`

Quick Tip

Unmask Hidden Files with `ls -A`

Challenge: By default, the `ls` command hides files and directories that start with a dot (e.g., `.bashrc`, `.config`). This can make it difficult to see all the files in a directory, especially configuration files.

The Solution: Use the `-A` or `–almost-all` flag with the `ls` command to display all entries except for `.` and `..`.

ls -A

Why it works: The `-A` flag tells `ls` to list all files and directories, including those that are hidden (start with a dot), but it omits the special current directory (`.`) and parent directory (`..`) entries, making the output cleaner than `ls -a` for most use cases.

Pro-Tip: For a more visually appealing and feature-rich directory listing that also includes hidden files, consider installing and using `lsd` (ls deluxe).

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

0 0 votes
Article Rating
Exit mobile version