How do I write the command to find all files with any lower case letters in the filename? I have tried
find . -name *\(a-z\) and a lot of combinations like that, without success.
thanks
JP:confused:
How do I write the command to find all files with any lower case letters in the filename? I have tried
find . -name *\(a-z\) and a lot of combinations like that, without success.
thanks
JP:confused:
To find all files that have a lowercase letter anywhere in the filename:
ls | egrep [a-z]
That'll give you them files with lowercase letters somewhere in the filename for the current directory only.
To scan subdirectories...navigate to the higest point for the search then use
ls -lR | egrep [a-z]
This will recurse through all subdirectories below that point.
That will match all filenames, since you're using ls -lR... since it's now a long listing there will always be a lowercase letter in there somewhere (like the permissions...).
Try find /dir -name "*[a-z]*"
I think that should do it...
thanks everyone, for the easy way. if you would like a more complicated method, try this:
ls|egrep [a-z]|cut -d : -f2 > list$$;cat list$$|xargs ls -l; rm list$$
JP;)