Show hidden files with ls -a
See .git, .env, .bashrc and every other dotfile that plain ls hides.
Run ls -la to list all files including hidden ones, with sizes, dates, and permissions.
01Command
Command
$ ls -la ~/ && ls -lad .git02What it does
Any filename starting with a dot is hidden from normal ls output and from most file managers. ls -a shows everything including . and ..; ls -A (capital) is the same minus those two. Dotfiles usually hold configuration — .env files in particular often contain secrets, which is exactly why tools hide them.
03Risk
!Warning: Hidden doesn't mean protected: ls -a merely makes them visible, and rm -rf * still skips them (the glob doesn't match dotfiles) while rm -rf .* can match .. and chew through parent directories — never run that pattern.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- ls(1) — Linux manual pageEvidence: ls -a includes entries whose names begin with a dot; -A omits the . and .. entries; combined with -l it shows details for hidden files.
Last verified: 2026-09-18 · Category: Files & Folders