Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Mar 2004 08:29:46 +0800
From:      Stephen Liu <satimis@icare.com.hk>
To:        Jerry McAllister <jerrymc@clunix.cl.msu.edu>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How to remove a non-empty directory
Message-ID:  <200403030829.46945.satimis@icare.com.hk>
In-Reply-To: <200403021428.i22ES5Z04990@clunix.cl.msu.edu>
References:  <200403021428.i22ES5Z04990@clunix.cl.msu.edu>

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



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