Ubuntu – How to show only hidden files in Terminal

command linels

I have a directory that contains thousands of files, some of them are hidden.

The command ls -a list all files, including hidden ones, but I need just to list hidden files.

What command should I use?

Best Answer

The command :

ls -ld .?* 

Will only list hidden files .

Explain :

 -l     use a long listing format

 -d, --directory
              list  directory entries instead of contents, and do not dereferā€
              ence symbolic links

.?* will only state hidden files