dmacks
02-15-2006, 01:06 PM
You could invert the find so that you get a list of files that do not have the jpg extension.
slacker
02-15-2006, 03:28 PM
Try this:
find . -type f -name "*" -print | grep --ignore-case --invert-match .jpg
Anything that appears is a file without .jpg in the filename (I think you add $ to extension for end of file name, but I forget if that is only in egrep (.jpg$).
guardian34
02-15-2006, 03:37 PM
Do you mean that you want to see if a folder contains only jpg files, and not anything else? Then you could try something like this:
find . -not -iname '*.jpg'
That may show a period for the current file, as well as invisble files. If you don't want to show those, you could try something like this:
find . -not -iname '*.jpg' -not -iname '.*'