News for hackers. Stuff that matters.
Re:I Accidentally Deleted 7TB of Videos Before Going to Prod... by ivanhoe on Friday May 06, 2022 @04:28AM (#31282783)
Beside doing this, I like to first just move files to another dir (keeping the relative path) instead of deleting them. It's basically like a DIY recycle bin.

If both paths are on the same disk moving files is a fast operation - and if you discover a screw up, you can easily undo it. On the other hand if everything still looks fine after a few days, you just `rm -rf` that folder and purge the files.

There are no comments on this comment yet.