From owner-freebsd-hackers Tue Nov 21 21:34:52 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from lafontaine.cybercable.fr (lafontaine.cybercable.fr [212.198.0.202]) by hub.freebsd.org (Postfix) with SMTP id 5459C37B479 for ; Tue, 21 Nov 2000 21:34:49 -0800 (PST) Received: (qmail 10802921 invoked from network); 22 Nov 2000 05:34:47 -0000 Received: from s011.dhcp212-229.cybercable.fr (HELO gits.dyndns.org) ([212.198.229.11]) (envelope-sender ) by lafontaine.cybercable.fr (qmail-ldap-1.03) with SMTP for ; 22 Nov 2000 05:34:47 -0000 Received: (from root@localhost) by gits.dyndns.org (8.11.1/8.11.1) id eAM5Yfv09792; Wed, 22 Nov 2000 06:34:41 +0100 (CET) (envelope-from clefevre@cybercable.fr) Original-Sender: Cyrille Lefevre Original-Sender: Cyrille Lefevre To: "Daniel O'Connor" Cc: Brian Reichert , freebsd-hackers@FreeBSD.ORG Subject: Re: find, -delete, and relative paths References: X-Face: V|+c;4!|B?E%BE^{E6);aI.[<97Zd*>^#%Y5Cxv;%Y[PT-LW3;A:fRrJ8+^k"e7@+30g0YD0*^^3jgyShN7o?a]C la*Zv'5NA,=963bM%J^o]C In-Reply-To: "Daniel O'Connor"'s message of "Tue, 21 Nov 2000 12:08:56 +1030 (CST)" From: Cyrille Lefevre Reply-To: Cyrille Lefevre Mail-Copies-To: never Date: 22 Nov 2000 06:34:40 +0100 Message-ID: Lines: 34 User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "Daniel O'Connor" writes: > On 20-Nov-00 Brian Reichert wrote: > > I didn't find anything after an admittedly quick look intp PRs and the mail > > list archives: > > > > Under FreeBSD 3.4-RELEASE, we are running a simple log file scrubber: > > > > 15 3 * * * find /usr/local/logs/lsp \! -ctime 1 -delete > > > > I pointedly am using an absolute path, yes I get this warning repeatedly: > > > > find: -delete: /usr/local/logs/lsp: relative path potentially not safe > > > > How can I suppress this warning? Is it a bug in find, or did I > > misunderstand the manpage? > > I don't know why, but I think find prints those messages when you attempt to delete > a directory. > > If you do -> > 15 3 * * * find /usr/local/logs/lsp -type f -a \! -ctime 1 -delete > > it should work.. 15 3 * * * find /usr/local/logs/lsp -depth \! -ctime 1 -delete could be better, deletes file entries before directory ones. PS : -a is not necessary, it's always implied except if -o of course. Cyrille. -- home: mailto:clefevre@citeweb.net work: mailto:Cyrille.Lefevre@edf.fr To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message