5 ms·
rm is for removing stuff. If you don’t want to remove the file, use mv. Take care when entering commands, if it’s important that you don’t mess up, spend an ex
by surfsvammel 8y ago
rm is for removing stuff. If you don’t want to remove the file, use mv.
Take care when entering commands, if it’s important that you don’t mess up, spend an extra second. Don’t run around shooting rm -rf as super user.
With great powers comes great responsibility.
- joelthelion 8y agoWould be nice if filesystems were garbage collected, though. I don't see a fundamental reason why rm couldn't be undoable the second after you issue it.
- majewsky 8y agoIt usually is: http://extundelete.sourceforge.net http://extundelete.sourceforge.net
- tyfon 8y agoMost have SSD drives now that trims the space on delete. Not sure how easy it is to mark regions on the SSD for "undelete" when it has been trimmed. In some cases the deleted region of the drive may even be mapped to another place on the memory chip itself to cycle it.
- ac29 8y agoOn Linux at least, it's not recommend to run continuous TRIM (aka "discard"). Instead, you can run fstrim on a timer to clean things up periodically. Most SSD's can actually do either, but discard is recommend against for NVMe drives, and many SSD's have bugs, so overall periodic trim is the way to go.
- Volundr 8y agoCheck out nilfs, where this is explicit. Every filesystem action results in a checkpoint, and checkpoints are garbage collected only as-needed to maintain free space.