× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Jonathan,

I've never used QSHELL before and have come across the "find" and "grep"
commands through Google and the archives, but can't seem to get anything
to work.

Typically, you'd just do this (from QShell):

grep -F -R -i "string to find" /usr/local/src

Replace "/usr/local/src" for the directory you want to start searching in.

-R tells it to search all files & subdirectories of the directory given.

-i means "case-insensitive". Leave this off if you want it to match
upper/lowercase exactly.

-F tells it to search for a flat string (as opposed to a regular
expression). Depending on what you're seaching for, this flag
may not matter. Leave it off if you want to search for
regular expressions (which are a really fancy way of providing
"wildcards", if you're not familiar with what an reg exp is.)

The manual page for grep can be found here:
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rzahz/grep.htm

You probably don't want 'find', since find only searches file names, not their contents. But, in some cases you need something more complex, such as running grep on all files that are owned by the BOB user profile -- in that case, you can combine 'find' with 'grep' to achieve your goal...

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.