[ILUG] Re: rmdir --exclude=foo-dir?
Brian Foster
blf at utvinternet.ie
Fri Feb 10 16:24:33 GMT 2012
[more profuse apologies if this happens to double-post...]
>On 02/06/2012 09:18 AM, Frank Murphy wrote:
>> My logic is failing me, usually does.
>> How can I run:
>> rmdir /home/frank/*
>> but exclude my nfs mountpoints
>
>Do this first:
>
> for mp in mp1 mp2; do touch ~/$mp/.dont_rmdir; done
This is much better than my solution, albeit
it does assume (1) The dirs are writable;
and (2) The dirs are in the same state (either
mounted or not-mounted) whenever the ‘rmdir’
is run later.
cheers!
-blf-
--
“How many surrealists does it take to | Brian Foster
change a lightbulb? Three. One calms | somewhere in south of France
the warthog, and two fill the bathtub | Stop E$$o (ExxonMobil)!
with brightly-coloured machine tools.” | http://www.stopesso.com
More information about the ILUG
mailing list