by wmil · 9y ago · 0 comments
Under some shells (eg bash) that will expand to include `..` and `.`.
Hopefully, it was not at the root directory and we have frequent snapshots.
Edit: What would have been much more worse, if I had done it, would have been
rm -rf ~ /foo
instead of rm -rf ~/foo rm -rf /usr /lib/modules/something/somethinghttps://www.wired.com/2001/11/glitch-in-itunes-deletes-drive...
You can use the `Pathname` class to treat paths as objects, which you can concatenate only valid paths with. Aside from obviously all the other sanity-saving features.
I'd love to see someone deploy a Python or Ruby-based shell. I'm sure these are available, but they're not widely used.