3 ms·
I don't want to have to type rm --wet-run tempfile.tmp every time, or mkdir -p --yes-really-do-it /usr/local/bin The program should default to actually doing w
by ryandrake 9mo ago
I don't want to have to type rm --wet-run tempfile.tmp every time, or mkdir -p --yes-really-do-it /usr/local/bin
The program should default to actually doing whatever thing you're asking it to do.
On the other hand it would be great if every tool had an --undo argument that would undo the last thing that program did.
- homebrewer 9mo agoThat undo program is called nilfs2, which unfortunately never became popular. I'll simply quote the kernel docs: > NILFS2 is a log-structured file system (LFS) supporting continuous snapshotting. In addition to versioning capability of the entire file system, users can even restore files mistakenly overwritten or destroyed just a few seconds ago. https://docs.kernel.org/filesystems/nilfs2.html https://docs.kernel.org/filesystems/nilfs2.html https://wiki.archlinux.org/title/NILFS2 https://wiki.archlinux.org/title/NILFS2 https://en.wikipedia.org/wiki/NILFS https://en.wikipedia.org/wiki/NILFS
- aappleby 9mo agoSure, in those cases - but if a command has a chance of nuking prod, you want some extra step in there. Preferably something that can't be muscle-memoried through.
- arjie 9mo agoNo rule is ironclad. I think matching risk to functionality is usually a good idea. For example, most modern Linuxen carry `rm` protected against root removal with `--no-preserve-root`. That is indeed `rm --wet-run` by a different name in the dangerous case.