4 ms·
Is there a good reason why Linux doesn't have a recycle bin?
by cool-RR 15y ago
Is there a good reason why Linux doesn't have a recycle bin?
- trustfundbaby 15y ago<sarcasm>because real Operating systems don't need one?</sarcasm>
- cool-RR 15y agoThat's what I thought. I'd be happy if anyone chimed in with a legitimate reason, but I won't be surprised if the lack of a recycling bin is just one more symptom of the Linux developer community's apathy towards the actual human beings who use their software.
- uxp 15y agoI would speculate that it is a historical reason. It's no secret that the Unix environment was not designed for personal use in homes, but on mainframe time shared computers inside universities and businesses. Space was limited, and just moving files to another location to deal with later added unnecessary steps to a process that didn't have much of a benefit, at the time. As space has become less valuable on computers, and they have become less of a specialized tool, it may be wise to add one, but most of the desktop environments already implement it already so there is no need to recreate the functionality at a lower level.
- cool-RR 15y agothere is no need to recreate the functionality at a lower level. I refer you to the original submission.
- meastham 15y agoAlmost all of the desktop environments commonly used with Linux do have a trash bin.
- cool-RR 15y agoIf it wasn't obvious, "Why is `rm -rf` not connected to the recycle bin?" is implicit in my original question.
- CGamesPlay 15y agoYou're operating at a layer below where a trash can makes sense. Pretend that this command had moved everything to a trash can. The command to move the files out of the trash can now resides in the trash can, where it isn't being very useful. It's still possible to recover the files, but then again, it's also still possible to recover the files you deleted with rm. rm is on the same layer as the DOS del command. Neither goes to the trash can, because they operate on a lower level.
- cool-RR 15y agoit's also still possible to recover the files you deleted with rm. If you're lucky and didn't write too much to the hard-disk after deletion, yes, but with a recycling bin you have much higher chances of recovery. Regarding `del` in DOS: You're the second one to bring up that analogy. I don't see how this is relevant. Just because Windows does it that way doesn't mean that it's good.
- meastham 15y agoBecause that's not what rm does. Changing it would be breaking all sorts of standards. Many, many things depend on rm simply unlinking files. Why don't you use a different program if you would like to have some sort of trashbin behavior?
- cool-RR 15y agoI'd be cool with using a clone of `rm` that sends to the recycling bin instead of actually deleting. I think that Linux should include a clone like this by default.
- rcfox 15y agoEven if it did, you wouldn't use it in this case. Windows batch files delete files outright too, instead of sending them to the recycling bin. You don't want to have to depend on the user to clean up after your automation.
- cool-RR 15y agoYou don't want to have to depend on the user to clean up after your automation. I don't see what's the big deal is. Once in a while when the recycling bin gets too big, the user can empty it. Or you can have a scheduled operation that deletes stuff after 30 days.
- rcfox 15y ago> Once in a while when the recycling bin gets too big, the user can empty it. Many Linux systems don't even have a regular "user". They just sit in a corner and serve webpages, or do other tasks silently. > Or you can have a scheduled operation that deletes stuff after 30 days. Why not just keep backups for 30 days?
- cool-RR 15y agoWhy not just keep backups for 30 days? Be realistic. Setting up backups takes effort that many users are not going to expand, while the recycling bin mechanism can be set up by default.
- Dylan16807 15y agoBackups have a latency that a recycle bin doesn't. When I made something two hours ago this is the worst time to unlink it.
- billswift 15y agoMine does, now. I have a directory ~/.trash and a script rm that moves files to the trash. If I really want to permanently delete something I need to use /bin/rm (including for cleaning out my .trash dirs). ADDED: Note that I have a .trash in each user's home directory including /root. And a copy of the rm script in each user's home/bin.