Find all directories that contain a certain character and print them out
The following commands perform the required query:
find -name "*c*" -type d
- starts with the current directory (no need to specify directory in case of current directory)
-name "*c*"
- with name contains the letterc
-type d
- which are a directory
You can run the command on other directory (/full/path/to/dir
) using:
find /full/path/to/dir -name "*c*" -type d
More info nixCraft find command