Solved

Unix FIND command.

Posted on 2000-04-08
3
198 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
This article will show, step by step, how to integrate R code into a R Sweave document
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 …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

760 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now