Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Apr 2016 10:13:02 -0400
From:      David Banning <david+dated+1462111984.5033c3@skytracker.ca>
To:        Michael Schuster <michaelsprivate@gmail.com>
Cc:        questions@freebsd.org
Subject:   Re: deleting /tmp files from crontab
Message-ID:  <20160426141301.GA62352@skytracker.ca>
In-Reply-To: <571F63B3.4040803@gmail.com>
References:  <20160426123012.GA57555@skytracker.ca> <571F63B3.4040803@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160426141301.GA62352>