Linux / Unix: Bash Find Matching All Dot Files

You can use the find command in a bash shell to search for matching files, including files that start with a dot (.), which are considered hidden files in Unix-like systems. To find all dot files (files starting with a dot) in the current directory, you can use the following command:

find . -name ".*"

This will search for all files in the current directory (.) that match the pattern .*, which matches files starting with a dot. The find command will print the names of the matching files to the terminal.

If you want to find dot files in a specific directory, you can replace the current directory (.) with the desired directory in the find command. For example:

find /path/to/dir -name ".*"

This will search for dot files in the /path/to/dir directory.

Leave a Comment