Hacker News new | comments | show | ask | jobs | submit login
Protecting a directory from being accidentally erased by rm -rf * (commandlinefu.com)
7 points by xtacy 2184 days ago | hide | past | web | 2 comments | favorite



I guess the inverse of this is

cd <dir>; touch ./-rf


> cd <dir>; touch ./-rf

Ha! That is evil!

But I can counter it. Assuming we're using Bash:

$ alias rm="rm --"

Your move. ;-)

P.S. OTOH, the alias above also defeats the "touch ./-i" idea.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: