From owner-freebsd-hackers Wed Nov 22 9:56:35 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from aaz.links.ru (aaz.links.ru [193.125.152.37]) by hub.freebsd.org (Postfix) with ESMTP id 753E237B695 for ; Wed, 22 Nov 2000 09:56:26 -0800 (PST) Received: (from babolo@localhost) by aaz.links.ru (8.9.3/8.9.3) id UAA14466; Wed, 22 Nov 2000 20:54:48 +0300 (MSK) Message-Id: <200011221754.UAA14466@aaz.links.ru> Subject: Re: find, -delete, and relative paths In-Reply-To: from "Cyrille Lefevre" at "Nov 22, 0 06:34:40 am" To: clefevre@cybercable.fr Date: Wed, 22 Nov 2000 20:54:48 +0300 (MSK) Cc: doconnor@gsoft.com.au, reichert@numachi.com, freebsd-hackers@FreeBSD.ORG From: "Aleksandr A.Babaylov" MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Cyrille Lefevre writes: > "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. Look at ports/sysutils/deleted daemon that deletes old files, directories and other -- @BABOLO http://links.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message