Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!


Click here to return to the 'Not a good idea' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
Not a good idea
Authored by: googoo on Fri, Feb 29 2008 at 8:28AM PST
In general, it is not a good idea to redefine basic commands like rm. You can run into problems with scripts and such that use the command. A better option would be to give your script another name (like the old rmm script) to avoid these conflicts.

-Mark

[ Reply to This | # ]
Yes and no
Authored by: SeanAhern on Fri, Feb 29 2008 at 9:09AM PST
If you created a shell script that did this, and put it somewhere in your $PATH, I'd agree with you. But this guy did it as a shell function. This means that it only takes effect in bash shells. And if he loads functions correctly, then it would only take effect in login bash shells. This restricts it to only interactive use, exactly what you want. It no longer affects scripts and other tools.

[ Reply to This | # ]