Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Apr 2007 18:49:07 +0200
From:      Pieter de Goeje <pieter@degoeje.nl>
To:        freebsd-questions@freebsd.org
Subject:   Re: rm --clear-directory /home/me/another_dir
Message-ID:  <200704111849.08117.pieter@degoeje.nl>
In-Reply-To: <461D0614.2060709@gmail.com>
References:  <461D0614.2060709@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 11 April 2007, deeptech71@gmail.com wrote:
> Is there a way to clear a directory with such a command (keeping the owner
> and permissions of the folder)?
>
> Yes there are the obvious ones:
> cd /home/me/another_dir && rm *
> rm /home/me/another_dir/* // if cant traverse here
>
> But something that doesn't rely on the shell.
cd /some/dir && find . -delete

Cheers, Pieter



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