summaryrefslogtreecommitdiff
path: root/system/trashy/trashy.8
blob: 76bc857651d58623997bba756751c51bcb68d4ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
.\" 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