Hacker News new | ask | show | jobs
by showsomerespect 604 days ago
until you delete something you didn't mean to delete...
1 comments

Then use a DE that moves the file into the trash.
Your desktop environment doesn't have any effect on the command line
I could not edit my comment in time, but I would also like to add that when it comes to family: they do use a DE, not the terminal or command line.
The command line is for power users, and utilities designed for file manipulation like "rm" should operate as intended (in this case, removing files outright).

Users should understand the risks and benefits of using these powerful tools without unnecessary safeguards and constraints. Users who understand these tools should have the freedom to use them without unnecessary interruptions. If someone requires additional safety measures, they can still use the same "rm" utility which already supports options for added safety such as the "rm -i" command for interactive mode or use "mv" (which is designed for moving / renaming files); however, imposing constant prompts or silly defaults would be antithetical to the efficiency and speed that power users expect from command-line operations.

When I use "rm", I expect my files to be removed quickly and efficiently. I believe it is important to note that using "rm" does not actually erase the file's data from the disk; it removes the directory entry for the file and deallocates the inode associated with that file. This means that the data remains on the disk until it is overwritten, making it potentially recoverable. If I want to ensure that files are truly removed, I use "srm" (secure remove). The "srm" utility not only removes the file entry but also overwrites the data on disk multiple times with random patterns which means it truly gets removed (excluding edge cases related to specific file system behaviors such as those using journaling or copy-on-write mechanisms or maintain snapshots or copies of files, and so forth).