From owner-freebsd-questions@FreeBSD.ORG Wed Apr 11 16:49:17 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 318F416A400 for ; Wed, 11 Apr 2007 16:49:17 +0000 (UTC) (envelope-from pieter@degoeje.nl) Received: from smtp.utwente.nl (smtp1.utsp.utwente.nl [130.89.2.8]) by mx1.freebsd.org (Postfix) with ESMTP id B4B2313C459 for ; Wed, 11 Apr 2007 16:49:14 +0000 (UTC) (envelope-from pieter@degoeje.nl) Received: from nox.student.utwente.nl (nox.student.utwente.nl [130.89.165.91]) by smtp.utwente.nl (8.12.10/SuSE Linux 0.7) with ESMTP id l3BGn8Lr022276; Wed, 11 Apr 2007 18:49:08 +0200 From: Pieter de Goeje To: freebsd-questions@freebsd.org Date: Wed, 11 Apr 2007 18:49:07 +0200 User-Agent: KMail/1.9.6 References: <461D0614.2060709@gmail.com> In-Reply-To: <461D0614.2060709@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200704111849.08117.pieter@degoeje.nl> X-UTwente-MailScanner-Information: Scanned by MailScanner. Contact helpdesk@ITBE.utwente.nl for more information. X-UTwente-MailScanner: Found to be clean X-UTwente-MailScanner-From: pieter@degoeje.nl X-Spam-Status: No Cc: Subject: Re: rm --clear-directory /home/me/another_dir X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Apr 2007 16:49:17 -0000 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