Even after using Linux for a decade I made this blunder(old.reddit.com) |
Even after using Linux for a decade I made this blunder(old.reddit.com) |
mv -t /tmp FILE ...
to defer the irreversible operation until some time outside your current flow of task-directed thought. Zero-copy, therefore fast, provided you're working within the root filesystem. Recovery from /tmp is only a slight hassle (use the metadata mod time).But most HNers probably know this and are using it or something better. I wanted to share in case it's valuable for someone out there.