Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Mar 2004 09:28:04 -0500 (EST)
From:      Jerry McAllister <jerrymc@clunix.cl.msu.edu>
To:        satimis@icare.com.hk (Stephen Liu)
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How to remove a non-empty directory
Message-ID:  <200403021428.i22ES5Z04990@clunix.cl.msu.edu>
In-Reply-To: <200403022221.24406.satimis@icare.com.hk> from "Stephen Liu" at Mar 02, 2004 10:21:24 PM

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> 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?200403021428.i22ES5Z04990>