Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Unix FIND command.

Posted on 2000-04-08
3
Medium Priority
?
248 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Starting up a Project

636 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