Date: Tue, 19 Jul 2005 17:34:16 +0300 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Jonathan Glaschke <no-html@jonathan-glaschke.de> Cc: freebsd-questions@freebsd.org Subject: Re: Delete files in directory... Message-ID: <20050719143416.GB18276@beatrix.daedalusnetworks.priv> In-Reply-To: <20050719162708.GA46146@jogla.fbsd> References: <42DCCCC9.5080802@os.lv> <20050719162708.GA46146@jogla.fbsd>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2005-07-19 16:27, Jonathan Glaschke <no-html@jonathan-glaschke.de> wrote: > On Tue, Jul 19, 2005 at 12:50:01PM +0300, Casper wrote: > > Sorry, simple, stupid q. How to make that what come in directory > > /usr/files/ for example are erased? Or only put in cron after while > > do "rm /usr/files/*"? > > Yes, using cront to do that is possible and i think there is no reason against > cron. > > you need "rm -rf /usr/files/*" if there are directories too in /usr/files.. This doesn't remove ".*" subdirs. A more complete alternative that doesn't move /usr/files under the feet of programs that may have it open as their current working directory is probably: rm -fr /usr/files/* /usr/files/.[^.]* Be very careful with the -r option of rm(1) though. VERY careful. Just my $0.02, - Giorgos
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050719143416.GB18276>