Subject: Re: cd success?
To: Jan Danielsson <jan.m.danielsson@gmail.com>
From: Thilo Jeremias <jeremias@optushome.com.au>
List: netbsd-users
Date: 01/26/2007 21:49:57
Jan Danielsson wrote:
> Christoph Kaegi wrote:
>   
>>>    cd ~/backup/foo
>>>    rm -Rf *
>>>       
>> I'd do 
>>
>>   rm -Rf ~/backup/foo/*
>>     
>
>    Yes, well that's true -- but I need to step into that directory later
> and do stuff, so I still need to make sure it exist. :-)
>
>
>   
what about
mv ~/backup/foo ~/backup/delme && rm -rf  ~/backup/delme &
mkdir ~/backup/foo && cd ~/backup/foo
, this way you
 run the rm in background and w/o the * you wont accidently remove ~/*

( I hate *'s in rm -r's just because I too often deleted the wrong 
things... and the star won't catch ./.??* files )

thilo