mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-18 22:06:04 +01:00
436dd2aa3e
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
108 lines
3.2 KiB
Groff
108 lines
3.2 KiB
Groff
.\" trashy - an rm intermediary
|
|
.TH "trashy" "8" "" "Klaatu" ""
|
|
.SH "NAME"
|
|
trashy \- trash in the shell
|
|
.SH "SYNOPSIS"
|
|
\fBtrash\fP file1 file2...
|
|
.nf
|
|
\fBempty\fP [option]
|
|
.SH "DESCRIPTION"
|
|
.PP
|
|
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
|
|
\fBrm\fP.
|
|
.PP
|
|
\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.
|
|
.PP
|
|
.SH "USAGE"
|
|
.TP
|
|
Issue this command:
|
|
.PP
|
|
\fBtrash\fP foo
|
|
.PP
|
|
and foo will be moved to the system trash.
|
|
.PP
|
|
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?
|
|
.PP
|
|
When you're really really sure that everything in
|
|
your Trash wants to be nuked out of existance, then you can
|
|
issue the command:
|
|
.PP
|
|
trask --empty
|
|
.PP
|
|
and your Trash will be emptied.
|
|
.PP
|
|
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
|
|
it:
|
|
.PP
|
|
\fBtrash\fP foo\\ bar
|
|
.PP
|
|
If you issue \fBtrash\fP without any arguments, it tells you the
|
|
current size of your system trash.
|
|
.SH OPTIONS
|
|
.PP
|
|
.TP
|
|
.B -l, --list
|
|
Lists the contents of your trash can.
|
|
.TP
|
|
.B -v, --verbose
|
|
Makes \fBtrashy\fP verbose.
|
|
.TP
|
|
.B -w, --version, --which
|
|
Returns the version of trashy you are currently running. -w because -v
|
|
was already taken by verbose :-)
|
|
.TP
|
|
.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.
|
|
.PP
|
|
.SH "SYSTEM TRASH LOCATIONS"
|
|
.PP
|
|
On Linux, BSD, Ilumos, and Solaris, the system trash, by default, is
|
|
that defined by the Free Desktop specification: ~/.local/share/Trash
|
|
.PP
|
|
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.
|
|
.PP
|
|
If all else fails, a ~/.trash directory is created and used.
|
|
.PP
|
|
.SH "BUGS AND ISSUES"
|
|
.PP
|
|
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.
|
|
.PP
|
|
.SH "ALTERNATIVES"
|
|
.PP
|
|
\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"
|
|
.nf
|
|
.I rm (1)
|
|
.I mv (1)
|
|
.URL http://slackermedia.info/trashy
|
|
.URL https://github.com/andreafrancia/trash-cli
|
|
.fi
|
|
.PP
|
|
.SH "AUTHORS"
|
|
.nf
|
|
Klaatu (klaatu@member.fsf.org)
|
|
.fi
|
|
.PP
|
|
.SH "BUGS"
|
|
Email bugs reports or fixes to klaatu@member.fsf.org
|
|
.fi
|