Solved

Unix FIND command.

Posted on 2000-04-08
3
231 Views
Last Modified: 2010-04-16
HI,
     Well I want to know how to make FIND command case-insensitive. Like if I say find /. - name experts. it should search for : experts, EXPERTS, Experts etc etc... Anybody knows how to do this?
0
Comment
Question by:kameshk
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
munsie earned 30 total points
ID: 2696394
find /. -iname experts

this will work with the GNU version of find (for linux).  I quickly tried this under Solaris and it did not work.

For platforms where it doesn't work, you'll have to download the GNU fileutils package and compile the find command.  Either install this as a replacement for the system find command or install into bin directory under your home dir, and make sure your home/bin dir is ahead of /bin and /usr/bin

dennis
0
 

Author Comment

by:kameshk
ID: 2696452
Well I have HP unix. And I am in professional enviornment. So guess patch working won't do for me. Thanx anyway.
0
 
LVL 2

Expert Comment

by:munsie
ID: 2696570
what does being in a professional environment have to do with it?  You still have a home directory that you can place an executable in, right?  from that, you just go and download the latest fileutils from the gnu website, configure, and compile...

now, if your trying to use this script in a production environment, you may need to have GNU find be approved for use.  But that wasn't indicated in the question above.

Another option is to go through HP and have them add the feature to their version of find.  Of the solutions, this is probally the least likely, or at the very least will cost you a lot of money.

and what are you refering to as patch working?  From what I see, the version of find installed on your machine doesn't do what you want it to, so if you want to get the task done, you need to get a version of find that works the way you want it to.  Since you're not the administrator, or if you are, you're not comfortable with replacing the system version of find with the GNU version, then why not compile the program and call it something else... maybe gnu-find?

if none of these are acceptable, then maybe you may need to reevaluate the script and maybe write it in another language like perl or C/C++.  Or at the very least, write a utility that does what you want find to do, but that seems awfully wasteful, since GNU find does it already today, and it's been tested more than any local program you'll end up writing.

good luck,
dennis
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A short article about problems I had with the new location API and permissions in Marshmallow
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question