From owner-freebsd-questions@freebsd.org Tue Apr 26 14:13:08 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E355B1DB6B for ; Tue, 26 Apr 2016 14:13:08 +0000 (UTC) (envelope-from david+dated+1462111984.5033c3@skytracker.ca) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 485151D39 for ; Tue, 26 Apr 2016 14:13:08 +0000 (UTC) (envelope-from david+dated+1462111984.5033c3@skytracker.ca) Received: by mailman.ysv.freebsd.org (Postfix) id 473DBB1DB6A; Tue, 26 Apr 2016 14:13:08 +0000 (UTC) Delivered-To: questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46E13B1DB69 for ; Tue, 26 Apr 2016 14:13:08 +0000 (UTC) (envelope-from david+dated+1462111984.5033c3@skytracker.ca) Received: from 3s1.com (3s1.com [162.213.106.199]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "3s1.com", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BCF661D38 for ; Tue, 26 Apr 2016 14:13:06 +0000 (UTC) (envelope-from david+dated+1462111984.5033c3@skytracker.ca) Received: from 3s1.com (localhost [127.0.0.1]) by 3s1.com (8.14.9/8.14.9) with ESMTP id u3QED53u064613 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 26 Apr 2016 10:13:05 -0400 (EDT) (envelope-from david+dated+1462111984.5033c3@skytracker.ca) Received: (from david@localhost) by 3s1.com (8.14.9/8.14.9/Submit) id u3QED45f064612 for questions@freebsd.org; Tue, 26 Apr 2016 10:13:04 -0400 (EDT) (envelope-from david+dated+1462111984.5033c3@skytracker.ca) X-Authentication-Warning: 3s1.com: david set sender to david+dated+1462111984.5033c3@skytracker.ca using -f Received: by 3s1.com (tmda-sendmail, from uid 1000); Tue, 26 Apr 2016 10:13:02 -0400 Date: Tue, 26 Apr 2016 10:13:02 -0400 To: Michael Schuster Cc: questions@freebsd.org Subject: Re: deleting /tmp files from crontab Message-ID: <20160426141301.GA62352@skytracker.ca> References: <20160426123012.GA57555@skytracker.ca> <571F63B3.4040803@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <571F63B3.4040803@gmail.com> User-Agent: Mutt/1.4.2.3i X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: David Banning X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2016 14:13:08 -0000 On Tue, Apr 26, 2016 at 02:48:51PM +0200, Michael Schuster wrote: > On 26/04/16 14:30, David Banning wrote: > >I am attempting to delete my .spamassassin files from my /tmp directory > > > >putting a command in my crontab; > > > >find /tmp/.spam* -mmin +360 -delete > > the find syntax looks strange (assuming this is straight 'find', not > somthing crontab-specific); normally, I'd expect to see > > # find /tmp -name '.spam*' -mmin +360 -delete That seems to delete the files, but not the directories starting in .spam* Reviewing the find man page, it appears the -delete implementation will not work unless the directory is empty. Still looking for solutions here. > > Does that help? > regards > Michael > > > >renders the following error; > > > >find: -delete: /tmp/.spamassassin10101hXUUVytmp: relative path potentially > >not safe > > > >looking in past postings on this matter, post people add the -mindepth 1, > >however in my case while it elliminates the error, > >it does not delete all the files, perhaps because some of the .spam* > >files are directories. > > > >I wonder if someone has a solution for this. > > > > > >_______________________________________________ > >freebsd-questions@freebsd.org mailing list > >https://lists.freebsd.org/mailman/listinfo/freebsd-questions > >To unsubscribe, send any mail to > >"freebsd-questions-unsubscribe@freebsd.org" > > > > -- > Michael Schuster > http://recursiveramblings.wordpress.com/ > recursion, n: see recursion >