News for hackers. Stuff that matters.
Re:Recovering deleted files using grep by derefr on Thursday August 19, 2010 @08:24PM (#1619120)
The kinds of files I most often regret rm-ing are the temporary files I have created myself as a step in a process, then deleted after I had moved onto the next step, not realizing an error had crept into the processor and that I would have to run it again on the source files (which are now, conveniently, gone.) Backups don't solve this problem, because the files themselves are never more than an hour old. A "trash" folder, however, fixes this perfectly: the semantic is that the file no longer has any place it "belongs," and may be purged if you successfully complete the project, but may be needed again if the project must be "rewound" to that step.

However, you're right that making rm(1) express move semantics isn't the right solution. Maybe if the filesystem had a "BEGIN TRANSACTION" command that you could ROLLBACK...

Re:Recovering deleted files using grep by BrandonM on Friday August 20, 2010 @10:58AM (#1620547)
Storage is cheap.... Why remove intermediate files at all? If you don't want to permanently remove files, then why use rm? Just create a "del" command that moves deleted files to a trash folder. You can then make part of your backup routine be to empty the trash after performing the backup (since that file would now be available in the backups).
Re:Recovering deleted files using grep by derefr on Tuesday August 24, 2010 @02:54AM (#1629168)
You're right—it's more of a "these files are in the way, and I'm sure I'm done with them... so it shouldn't hurt to just type those two little letters and reclaim the storage..."

Actually, that sounds like exactly the cognitive dissonance people had when they first started using Gmail. Perhaps filesystems need an "Archive" folder as well? Not even a Trash folder—because people want to empty a Trash folder—but rather just an enforced (and shell-supported) directory where things go when you don't have any reason to keep them, and therefore have no place to put them?

Re:Recovering deleted files using grep by MHordecki on Friday August 20, 2010 @12:16AM (#1619498)
Btrfs to the rescue!
Re:Recovering deleted files using grep by sid0 on Friday August 20, 2010 @04:41AM (#1619862)
TxNTFS!