rm(1) bug, possibly serious

Alex Zbyslaw xfb52 at dial.pipex.com
Wed Sep 26 11:02:46 PDT 2007


Dan Nelson wrote:

>In the last episode (Sep 26), Oliver Fromme said:
>  
>
>>Bob Johnson wrote:
>>
>> > Maybe. But I expect that the behavior for "rm -rf .." is there so
>> > that things don't get REALLY astonishing when you do "rm -rf *".
>>
>>The expansion of "*" does not include "." or "..".
>>    
>>
>
>Under /bin/sh, ".*" does match "." and "..", so be careful :)
>
>  
>
.??* is a standard workaround that works most of the time.  Won't match 
.a .b etc but such antisocial files are the exception, one might hope.

--Alex



More information about the freebsd-stable mailing list