# Linux – How to find a specific file in a directory tree

linux

Could someone please help me to find all the *.c and *.h files in a directory tree??

find . -name '*.[ch]' -type f

*.[ch] represents all *.h and *.c files, -type f finds regular files.