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: When listing directory contents with `ls`, you often don’t see files and directories that start with a dot (‘.’) – these are typically configuration files or hidden directories.

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

ls -A

Why it works: The `-A` option tells `ls` to list almost all files, including hidden ones, providing a more comprehensive view of directory contents without cluttering the output with the always-present ‘.’ and ‘..’ entries.

Pro-Tip: For a truly all-inclusive listing, including ‘.’ and ‘..’, use `ls -a`.

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

0 0 votes
Article Rating
Exit mobile version