Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

    rm --preserve-root -rf "$STEAMROOT/"*
would have worked too.


Really? Have you tried it? If your shell expands globs and you have any directories below / (both very common conditions), rm will not receive any arguments that are the root directory, and your --preserve-root will not alter its behavior. --preserve-root would help if the author of this particular nugget hadn't made the additional mistake of inserting a needless /*, but with that there the root directory would never be an argument to the rm.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: