Diffstat (limited to 'system/trashy/trashy.8')
1 files changed, 108 insertions, 0 deletions
diff --git a/system/trashy/trashy.8 b/system/trashy/trashy.8
new file mode 100644
@@ -0,0 +1,108 @@
+.\" trashy - an rm intermediary
+.TH "trashy" "8" "" "Klaatu" ""
+trashy \- trash in the shell
+\fBtrash\fP file1 file2...
+There is an unhealthy habit that arises with many a POSIX user: the
+careless and wreckless use of the dreaded \fBrm\fP command. \fBTrashy\fP
+is a helpful intermediary that intervenes when you would otherwise use
+\fBtrashy\fP attempts to be compliant with the Free Desktop specification for
+desktop trash, meaning that you can use \fBtrashy\fP in conjunction
+with a desktop environment and find your files in your desktop trash
+just as if you had dragged and dropped them there yourself. You can
+also restore the files by right-clicking and selecting `restore`, or
+whatever method your desktop defines for that process.
+Issue this command:
+and foo will be moved to the system trash.
+At this point, you have not yet removed the file from your system, so
+if you wish to recover it, go and fetch it from your trash. There, now
+isn't that nicer than \fBrm\fP?
+When you're really really sure that everything in
+your Trash wants to be nuked out of existance, then you can
+issue the command:
+and your Trash will be emptied.
+If there are spaces in your filenames, first of all stop using spaces
+in your filenames. Secondly, you must escape the space when you trash
+\fBtrash\fP foo\\ bar
+If you issue \fBtrash\fP without any arguments, it tells you the
+current size of your system trash.
+.B -l, --list
+Lists the contents of your trash can.
+.B -v, --verbose
+Makes \fBtrashy\fP verbose.
+.B -w, --version, --which
+Returns the version of trashy you are currently running. -w because -v
+was already taken by verbose :-)
+.B -d, --dry-run, --dryrun
+Does not actually move or remove files, just shows what will happen if
+you really did. The --empty process is verbose by default.
+.SH "SYSTEM TRASH LOCATIONS"
+On Linux, BSD, Ilumos, and Solaris, the system trash, by default, is
+that defined by the Free Desktop specification: ~/.local/share/Trash
+If you do not use an environment that plays nice with the Free Desktop
+spec (ie, Mac OS) then trashy will attempt to detect and use
+your actual system trash.
+If all else fails, a ~/.trash directory is created and used.
+.SH "BUGS AND ISSUES"
+Things can get a little messy when you're trashing files from an
+external drive because \fBtrash\fP currently moves the file from your external
+drive to your system harddrive. It works, but it's not as graceful as,
+say, creating a .trash folder on that external drive and hiding stuff
+there until later.
+\fBTrashy\fP depends on BASH. There is a similar application called
+trash-cli, which is Python-based. At this point, they do mostly the
+same thing, but obviously if you do not run BASH or ZSH or similar,
+then you might prefer a Python-based solution.
+.SH "SEE ALSO"
+.I rm (1)
+.I mv (1)
+Email bugs reports or fixes to email@example.com