Site icon New Generation Enterprise Linux

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

Quick Tip

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

Challenge: By default, the `ls` command in Linux hides files and directories that begin with a dot (‘.’) – often used for configuration files. This can make it difficult to see all files in a directory when you need to troubleshoot or manage dotfiles.

The Solution: Use the `-A` flag with the `ls` command to display all files, including hidden ones, without listing the current directory (‘.’) and parent directory (‘..’).

ls -A

Why it works: The `-A` (or `–almost-all`) option is a specific flag for `ls` that tells it to include entries starting with a dot, except for the special `.` and `..` entries. This provides a comprehensive view of directory contents.

Pro-Tip: For an even more visually appealing and detailed listing, consider installing and using `lsd` (a modern `ls` replacement) with `lsd -a`.

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

0 0 votes
Article Rating
Exit mobile version