Re: find and grep help



thanks to Barry
Your script worked

--- Barry Finkel <b19141@xxxxxxxxxxxxxxxxxxxx> wrote:

Robert Binkley <leebinkley@xxxxxxxxx> wrote:

I am currently looking for a way to use find to
search
a system and look for .rhosts and .netrc files but
exclude /home dir structure amd the /proc
could some one help.

I think this c-shell script will work; I have not
fully tested it.
I ran it as non-root on a Solaris 9 desktop, and I
found some files
and got a lot of "permission denied" messages.

------------
#!/bin/csh

foreach entry (`ls /`)
if (-d $entry) then
if (($entry != "home")&&($entry !=
"proc")) then
find /$entry -name .rhosts -print
find /$entry -name .netrc -print
endif
endif
end

----------------------------------------------------------------------
Barry S. Finkel
Computing and Information Systems Division
Argonne National Laboratory Phone: +1
(630) 252-7277
9700 South Cass Avenue Facsimile:+1
(630) 252-4601
Building 222, Room D209 Internet:
BSFinkel@xxxxxxx
Argonne, IL 60439-4828 IBMMAIL:
I1004994




Relevant Pages

  • Re: find and grep help
    ... a system and look for .rhosts and .netrc files but ... exclude /home dir structure amd the /proc ... foreach entry ...
    (AIX-L)
  • Re: find and grep help
    ... I have a script question though ... foreach entry ... Computing and Information Systems Division ...
    (AIX-L)