4 ms·
As much as I like these, these are also how you blow both feet off. As long as you're just exploring (everything is read only), you're okay. The moment "kill"
by bsder 5y ago
As much as I like these, these are also how you blow both feet off.
As long as you're just exploring (everything is read only), you're okay.
The moment "kill" and "rm" (anything mutable) come into the picture on a long shell pipeline, stop. You probably don't want to do that.
You need to be thinking very hard to make sure that an errant glob or shell substitution isn't going to wipe out your system. Make a complicated pipeline that creates a simple file, examine the simple file by hand, and then feed that file to "kill"/"rm"/"whatever" as close to unmodified as possible.
You may still blow your system away. However, at that point, you've given yourself the best chances to not do so.