From owner-freebsd-questions@FreeBSD.ORG Tue Mar 2 06:56:58 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D0D3016A4CE for ; Tue, 2 Mar 2004 06:56:58 -0800 (PST) Received: from smtpo01.icare.priv (unknown [203.78.64.148]) by mx1.FreeBSD.org (Postfix) with ESMTP id DEC0943D1D for ; Tue, 2 Mar 2004 06:56:57 -0800 (PST) (envelope-from satimis@icare.com.hk) Received: from smtpi01.icare.priv ([10.11.12.46]) by smtpo01.icare.priv with Microsoft SMTPSVC(5.0.2195.5329); Tue, 2 Mar 2004 22:56:56 +0800 Received: from 203.88.164.113 ([203.88.164.113]) by smtpi01.icare.priv with Microsoft SMTPSVC(5.0.2195.5329); Tue, 2 Mar 2004 22:56:56 +0800 From: Stephen Liu To: Jerry McAllister Date: Wed, 3 Mar 2004 08:29:46 +0800 User-Agent: KMail/1.5.4 References: <200403021428.i22ES5Z04990@clunix.cl.msu.edu> In-Reply-To: <200403021428.i22ES5Z04990@clunix.cl.msu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200403030829.46945.satimis@icare.com.hk> X-OriginalArrivalTime: 02 Mar 2004 14:56:56.0129 (UTC) FILETIME=[9B0E5B10:01C40066] cc: freebsd-questions@freebsd.org Subject: Re: How to remove a non-empty directory X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2004 14:56:58 -0000 Hi Jerry and other folks, Lot of thanks for your advice on the captioned question and time spent. I learn an alternative in removing a non-empty directory. mc/midnight commander is a small program. It moves and removes/deletes directory including sub-directories and files at the same. It also has editing capability. It is a small and handy tool. I have it installed from 'PORT'. B.R. Stephen On Tuesday 02 March 2004 22:28, Jerry McAllister wrote: > > Hi all folks, > > > > Kindly advise where can I find the small program 'midnight commander' for > > FreeBSD. OR what command line shall be applied on FBSD to remove a > > non-empty directory together with its content > > I have never tried anything called midnight commander, but you might > check in the ports collection. If you installed the skeleton like > you should have, go to /usr/ports and start looking around. > > As for removing a non-empty directory: > > rm -r dirname > > I normally cd to the dir's parent (just above it) and do a couple > of checks of where I am and what I am rm-ing before actually doing > it, because once you hit enter it is gone. > > If you happen to have any files in that directory tree with flags > set, especially schg, then it will not remove those, but will all > the others. Then you would have to go in and run chflags noschg on > those files and then go back out and run the rm -r again. > It will ask you if it is OK to remove those files and act like it > did, but it won't. kernel is one of those files that normally > have schg set on it. see man chflags > > ////jerry > > > TIA > > > > B.R. > > satimis > > > > _______________________________________________ > > freebsd-questions@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > > To unsubscribe, send any mail to > > "freebsd-questions-unsubscribe@freebsd.org"