- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to search a file as non-case sensitive
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2006 09:25 PM
12-26-2006 09:25 PM
how to search a file as non-case sensitive
As every one knows the find command is case sensitive.
But if i want to search a file and that command should not sense the case. then what should i do?
Is there any switches in find command or anthing else?
Thanx & Rgds,
Guna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2006 09:31 PM
12-26-2006 09:31 PM
Re: how to search a file as non-case sensitive
Please see for the solution:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=968739
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2006 11:28 PM
12-26-2006 11:28 PM
Re: how to search a file as non-case sensitive
you may wish to pipe the output of the find to
e.g.
find
hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2006 11:50 PM
12-26-2006 11:50 PM
Re: how to search a file as non-case sensitive
The best way:
$ find /path -type f -name '[Ff][Ii][Ll][Ee][Nn][Aa][Mm][Ee]' -print
Another way:
$ find /path -type f -print | grep -i '/filename$'
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2006 12:39 AM
12-27-2006 12:39 AM
Re: how to search a file as non-case sensitive
You can use Perl's Find module. For example:
# perl -MFile::Find -le 'find sub{-f && /^F\d+.*\z/is && print},"/tmp"'
In this case, we will look in the '/tmp' directory for (only) files ('-f') whose basename begins with the letter 'F', followed by one or more digits ('\d+') and zero or more characters thereafter ('.*}. The '^' and '\z' anchor this pattern so only files beginning with the letter 'F' are sought.
The 'find' is done case-insensitvely.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2006 08:49 PM
12-29-2006 08:49 PM