I am trying to find all files in the directories and sub-directories on Desktop with a file name starting with prac_
followed by two digits and ending in .c
or .o
find ./Desktop -type f -name "prac_[0-9][0-9]*" \( -name "*.c" -o -name "*.o" \)
The problem I'm having is that the above command will bring up files like prac_99BLAHBLAH.o
when I only want files with the format prac_99.c
.
-name 'prac_[0-9][0-9].c' -o -name 'prac_[0-9][0-9].o'