Difference between-regex and-name of find 1. the biggest difference with-name and-iname is that-regex uses the entire result output by find (different from the absolute path name) as the object to be matched, not just the last part of the result www.2cto.com example/The tmp directory contains only aaa, aa, 1, 2. The find-name "a *" files can be found in aaa and aa, while the find/tmp-regex "a *" files cannot be found. None of them can be found, because the result is as follows:/tmp/aaa/tmp/aa-name matches the "aaa" and "aa" sections in the result, -regex matches the complete "/tmp/aaa" and "/tmp/aa. so you need to write find/tmp-regex ". *. * "2. note that the above is. * Instead of * www.2cto.com-name, what can be interpreted is based on file glob in shell. Matching characters, including: (1) * represents any length string (2 )? Represents any single character (3) [set] represents an optional character set (4) [^ set] or [! Set] indicates a set (5) brace expansion that uses ASCII as the complete set for [set], that is,/tmp/{a, B, c} is extended to three strings:/tmp/a/tmp/B and/tmp/c. Note that the file globing mechanism of shell is often not considered a regular expression. -regex accepts the Regular Expression of "Orthodox", which has many things to say. Basically, it is the same as the regex mentioned in the emacs document, because the regex Interpretation Section in the find manual is actually the part that links to emacs to explain regex. in the above example, the biggest difference is. * represents any length string.