We were all new to linux at one point and using the find command was the first thing I learnt. If you need to find and list all hidden files and directories You need to use the find command to list all hidden files recursively on a Linux or Unix like systems.

The basic command is as follows:

find /dir/to/search/ -name ".*" -print


find /dir/to/search/ -name ".*" -ls

OR search only hidden files:

find /dir/to/search/ -type f -iname ".*" -ls

OR search only hidden directories:

find /dir/to/search/ -type d -iname ".*" -ls


find /dir/to/search -path '*/.*' -print
find /dir/to/search -path '*/.*' -ls

In this example, search $HOME for all hidden files and dirs:

find $HOME -name ".*" -ls