|
|
| laziness, impatience, and hubris | |
| PerlMonks |
Comment on |
| ( #3333=superdoc: print w/ replies, xml ) | Need Help?? |
|
"grep jpg"? No login for you on my systems. :) One of these will actually find most if not all of the files with a JPEG extension without matching files like "not_a_jpg.gif". Whenever you have a fairly simple match, you'll come out ahead using the find built-ins rather than piping to grep.
find . -name '*.jpg' -o -name '*.jpeg' -o -name '*.JPG' -o -name '*.JPEG' find ./ -name '*.[Jj][Pp][Gg]' -o -name '*.[Jj][Pp][Ee][Gg]' And if you must use grep, do it right! find . | grep -i '[.]jpe\?g$' find . | egrep -i '[.]jpe?g$' -- In reply to Re^2: Find all JPEG files in a directory
by extremely
|
|