Solved

Unix FIND command.

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
topping2 challenge 13 91
word0 challenge 3 91
Modify a small python script 19 108
Need help making a program or form for inventory that exports to txt 8 41
This article will show, step by step, how to integrate R code into a R Sweave document
A short article about a problem I had getting the GPS LocationListener working.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
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…

772 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