linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* find
@ 2003-07-27 23:41 Mikael Chambon
  2003-07-28  7:53 ` find César Soler
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Mikael Chambon @ 2003-07-27 23:41 UTC (permalink / raw)
  To: linux-admin

Dear linux admin,

I apolozised in advance if it's the wrong mailing list.

I use a periodic shell script to check SUID files
on my linux servers using the command: 

"find / -type f -perm -4000 -print"

Does someone know if there is a way 
to tell find to discard /dev and /proc directories.

I am not really a shell guru so if someone could give me a hand to solve
this little problem I would really appreciate.

--
Mikael



^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: find
@ 2003-07-28 12:55 johnjulian1
  0 siblings, 0 replies; 6+ messages in thread
From: johnjulian1 @ 2003-07-28 12:55 UTC (permalink / raw)
  To: "Mikael Chambon", linux-admin

"Mikael Chambon" <raid-ml@cronos.org> wrote:

>Dear linux admin,
>
>I apolozised in advance if it's the wrong mailing list.
>
>I use a periodic shell script to check SUID files
>on my linux servers using the command: 
>
>"find / -type f -perm -4000 -print"
>
>Does someone know if there is a way 
>to tell find to discard /dev and /proc directories.
>
>I am not really a shell guru so if someone could give me a hand to solve
>this little problem I would really appreciate.
>
>--
>Mikael
>

Most people don't expect to find programs in /dev and for that reason many root kits put their files there. It shouldn't add much time to include it and may find a bad guy.

__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: find
@ 2003-07-28 16:34 Scott Taylor
  0 siblings, 0 replies; 6+ messages in thread
From: Scott Taylor @ 2003-07-28 16:34 UTC (permalink / raw)
  To: linux-admin

At 16:41 07/27/03, you wrote:
>Dear linux admin,
>
>I apolozised in advance if it's the wrong mailing list.
>
>I use a periodic shell script to check SUID files
>on my linux servers using the command:
>
>"find / -type f -perm -4000 -print"

>Does someone know if there is a way
>to tell find to discard /dev and /proc directories.

Find has many options; very configurable searching.  For ignoring 
directories read up on -prune switch under 'man find'.

>I am not really a shell guru so if someone could give me a hand to solve
>this little problem I would really appreciate.

Shell way...

#!/bin/sh

cd /

for i in `ls`
   do
     if ([ -d $i ] && [ $i != "proc" ]); then
#      ... do something with $i here ...
     fi
   done


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-07-28 16:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-27 23:41 find Mikael Chambon
2003-07-28  7:53 ` find César Soler
2003-07-28  8:09 ` find Benjamin Walkenhorst
2003-07-28  8:17 ` find Glynn Clements
  -- strict thread matches above, loose matches on Subject: below --
2003-07-28 12:55 find johnjulian1
2003-07-28 16:34 find Scott Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).