This works fine:
find . -name "skr[0-9][0-9][0-9][0-9][0-9].rtf" -type fThis does not work:
find . -name "skr[0-9]{5}.rtf" -type f
Could anyone please explain and give me something similar to second version of the command.
the {5} is a syntax from extended regular expressions not from shell globbing. It is not valid with -name.
You can use -regex instead of -name with some find versions (GNU). In that case your pattern have to match the whole path, be careful with * and ? and . as they have different meanings in regular expressions.
The repetition count syntax is part of "extended" RE, so you need to use -E (with find variants which actually support it):
find -E . -regex '.+/skr[0-9]{5}\.rtf' -type f
On Mac you need to install GNU findtools if you want such comfort:
brew install findutils --default-names
On some systems you can try gfind instead of find.
findcommand. Do you mean specifically GNUfind?