Date: Sat, 11 Jul 1998 02:17:33 -0500 (CDT) From: Joel Ray Holveck <joelh@gnu.org> To: circuit@vinson.navy.mil Cc: dchapes@ddm.on.ca, rminnich@Sarnoff.COM, hackers@FreeBSD.ORG Subject: Re: makeinf an executable command in Unix Message-ID: <199807110717.CAA10297@detlev.UUCP> In-Reply-To: <c=US%a=navy%l=INTRUDER-980711061354Z-25301@intruder.vinson.navy.mil> (circuit@vinson.navy.mil) References: <c=US%a=navy%l=INTRUDER-980711061354Z-25301@intruder.vinson.navy.mil>
index | next in thread | previous in thread | raw e-mail
> I am trying to make a cleanup routine for my hp-ux system. I made a file
> with the simple command
> find / -name core -print
> I saved it as .cleanup
> everytime i execut it with
> . .cleanup
> command it gives me Permission denied on several directories. Can anyon
> ehelp me out here?
This belongs in -questions, not in -hackers.
Execute it as root if you want it to be able to search every
directory. Execute it as a mortal if you only want it to be able to
search directories only mortals can read. (The main difference is
directories that may have sensitive information, like /var/crash.)
Better yet, add it to /etc/daily.local and let it run automatically
and mail root the results. (root generally should be forwarded to the
sysadmin in /etc/aliases anyway; don't forget to run newaliases!)
Don't use find ... -exec rm -f {} ; as this is a security hole.
The command may need to be
find / -name "*.core" -print
instead, since FreeBSD currently stores corefiles under progname.core
rather than just core. (I don't know what all versions this applies
to.)
Happy hacking,
joelh
--
Joel Ray Holveck - joelh@gnu.org - http://www.wp.com/piquan
Fourth law of programming:
Anything that can go wrong wi
sendmail: segmentation violation - core dumped
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807110717.CAA10297>
