Date: Tue, 30 Jan 2001 19:50:56 +0100 From: Gerhard Sittig <Gerhard.Sittig@gmx.net> To: freebsd-security@freebsd.org Subject: Re: cvs commit: src/usr.bin/login login.c Message-ID: <20010130195056.C253@speedy.gsinet> In-Reply-To: <7897.980850042@axl.fw.uunet.co.za>; from sheldonh@uunet.co.za on Tue, Jan 30, 2001 at 12:20:42PM %2B0200 References: <Pine.BSI.3.96.1010130050213.22700A-100000@ns3.octet.com> <7897.980850042@axl.fw.uunet.co.za>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jan 30, 2001 at 12:20 +0200, Sheldon Hearn wrote: > > On Tue, 30 Jan 2001 05:08:09 EST, Stu Pidaso wrote: > > > > # Destroy all stale Kerberos5 tickets > > > # > > > for i in `find /tmp -name 'krb5cc_*' -ctime +1 -print` ; do > > > rm -f $i > > > done > > > > and now you can delete you can delete any file in /tmp. > > > > touch 'krb5cc_1 somefileintmp' and wait. > > Well spotted. > > find /tmp -name 'krb5cc_*' -ctime +1 -exec rm -f {} \; > > I don't use -delete because it's not portable. What about the -print0 option and xargs(1)? Is it as portable as the above construction? Since this would result in less load (*much* less exec'ed processes). The "The xargs utility is expected to be IEEE Std 1003.2 (``POSIX.2'') compliant." part of `man xargs` gives me hope ... find /tmp -name 'krb5cc_*' -ctime +1 -print0 | xargs -0 rm -f virtually yours 82D1 9B9C 01DC 4FB4 D7B4 61BE 3F49 4F77 72DE DA76 Gerhard Sittig true | mail -s "get gpg key" Gerhard.Sittig@gmx.net -- If you don't understand or are scared by any of the above ask your parents or an adult to help you. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010130195056.C253>