When using find what is the correct format to say "Find files that end in .jpg OR .png"?
Is it as simple as using the | operator/character?
find -iname "*.jpg|*.png"
When using find what is the correct format to say "Find files that end in .jpg OR .png"?
Is it as simple as using the | operator/character?
find -iname "*.jpg|*.png"
No.
You need to use -o (OR) in find like:
find \( -iname '*.jpg' -o -iname '*.png' \)
Your one would be close to correct if you are matching Regex:
find -iregex ".*\(jpg\|png\)"
Or using extended Regex:
find -regextype posix-extended -iregex ".*(jpg|png)"