Trash – a safer and cross-platform `rm`
Instead of permanently deleting files from the command line, this little tool moves them to the trash.
Like me, you might be thinking, "But I can do the same thing with mv
." To this Sindre writes:
Not really. The mv command isn't cross-platform and moving to trash is not just about moving the file to a "trash" directory. On all OSes you'll run into file conflicts. The user won't easily be able to restore the file. It won't work on an external drive. The trash directory location varies between Windows versions. For Linux there's a whole spec you need to follow. On OS X you'll loose the Put back feature.
Who knew?
Discussion
Sign in or Join to comment or subscribe