![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Lowercase to Uppercase | ggovotsis | AIX | 7 | 10-16-2008 07:07 AM |
| Need to change filenames in a particular directory from lowercase to UPPERCASE | Duke_Lukem | UNIX for Dummies Questions & Answers | 7 | 01-07-2008 03:32 PM |
| replacing all 4 first upper char of every rec to lowercase ? | Browser_ice | UNIX for Dummies Questions & Answers | 2 | 08-02-2006 09:06 AM |
| How convert lowercase or uppercase | Alex20 | Shell Programming and Scripting | 5 | 03-07-2005 04:07 AM |
| uppercase to lowercase | webex | Shell Programming and Scripting | 4 | 01-03-2002 11:15 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
find lowercase filenames
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 |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
To find all files that have a lowercase letter anywhere in the filename:
ls | egrep [a-z] |
|
#3
|
|||
|
|||
|
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.
__________________
Pete |
|
#4
|
||||
|
||||
|
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... |
|
#5
|
|||
|
|||
|
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 |
|||
| Google The UNIX and Linux Forums |