Environment $ cat /etc/issue Ubuntu 22.04.5 LTS \n \l $ echo $SHELL /usr/bin/bash find names including "gdb" only directory I want to find names including "gdb" only directory. Create directories and files to test $ touch aa $ mkdir gdb $ mkdir 3gdb2 $ touch 2gdb2 $ ls -al $ touch 3gdb2/gdb.txt $ touch gdb/gdb.txt $ tree . ├── 2gdb2 ├── 3gdb2 │ └── gdb.txt ├── aa └── gdb └── gdb.txt 2 directories, 4 files Test find find names including "gdb" only directory. $ find . -type d -name "*gdb*" ./3gdb2 ./gdb find names "gdb" only directory. $ find . -type d -name gdb ./gdb find names including "gdb" only file. $ find . -type f -name "*gdb*" ./3gdb2/gdb.txt ./2gdb2 ./gdb/gdb.txt find names "config.log" only file in "github/" $ echo github/ | xargs -i find {} -type f -name config.log github/vim/src/auto/config.log