List Only the Hidden Files in a Directory

From HowToGeek

Jump to: navigation, search

Sometimes you want to only see the hidden files in a directory, and this command makes it easy.

ls -a | egrep "^\."

You can then alias the command so you can easily re-use it anytime:

alias lsh='ls -a | egrep "^\."'