-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrmw_man.html
418 lines (300 loc) · 12 KB
/
rmw_man.html
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
---
title: rmw manual
layout: default
---
<!-- Creator : groff version 1.23.0 -->
<!-- CreationDate: Thu Nov 7 04:39:47 2024 -->
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#RESTORING">RESTORING</a><br>
<a href="#ENVIRONMENT">ENVIRONMENT</a><br>
<a href="#FILES">FILES</a><br>
<a href="#NOTES">NOTES</a><br>
<a href="#DESKTOP INTEGRATION">DESKTOP INTEGRATION</a><br>
<a href="#REMOVABLE MEDIA">REMOVABLE MEDIA</a><br>
<a href="#EXAMPLES">EXAMPLES</a><br>
<a href="#RESTORING">RESTORING</a><br>
<a href="#CONFIGURATION">CONFIGURATION</a><br>
<a href="#AUTHORS">AUTHORS</a><br>
<a href="#REPORTING BUGS">REPORTING BUGS</a><br>
<a href="#COPYRIGHT">COPYRIGHT</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:9%; margin-top: 1em">rmw -
safe-remove utility for the command line</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>
<p style="margin-left:9%; margin-top: 1em"><b>rmw</b>
[<i>OPTION</i>]... <i>FILE</i>...</p>
<p style="margin-left:9%; margin-top: 1em">Move FILE(s) to
a WASTE directory listed in configuration file</p>
<p style="margin-left:9%; margin-top: 1em"><b>rmw -s <br>
rmw -u <br>
rmw -z</b> FILE...</p>
<p style="margin-left:9%; margin-top: 1em">Restore FILE(s)
from a WASTE directory</p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>
<p style="margin-left:9%; margin-top: 1em">rmw (ReMove to
Waste) is a trashcan/recycle bin utility for the command
line. It can move and restore files to and from directories
specified in a configuration file, and can also be
integrated with your regular desktop trash folder (if your
desktop environment uses the FreeDesktop.org Trash
specification). One of the unique features of rmw is the
ability to purge items from your waste (or trash)
directories after x number of days.</p>
<h2>OPTIONS
<a name="OPTIONS"></a>
</h2>
<p style="margin-left:9%; margin-top: 1em"><b>-h</b>,
<b>--help</b></p>
<p style="margin-left:18%;">show help for command line
options</p>
<p style="margin-left:9%;"><b>-c</b>, <b>--config</b>
FILE</p>
<p style="margin-left:18%;">use an alternate
configuration</p>
<p style="margin-left:9%;"><b>-l</b>, <b>--list</b></p>
<p style="margin-left:18%;">list waste directories</p>
<p style="margin-left:9%;"><b>-g[N_DAYS]</b>,
<b>--purge</b>[=<i>N_DAYS</i>]</p>
<p style="margin-left:18%;">purge expired files; optional
argument ’N_DAYS’ overrides
’expire_age’ value from the configuration file
(Examples: <b>-g90</b>, <b>--purge</b>=<i>90</i>)</p>
<p style="margin-left:18%; margin-top: 1em">By default,
purging is disabled (’expire_age’ is set to
’0’ in the configuration file). To enable, set
the ’expire_age’ value in your config file to a
value greater than ’0’</p>
<p style="margin-left:18%; margin-top: 1em">You can use
’-vvg’ to see when the remaining files in the
waste directories will expire.</p>
<p style="margin-left:9%;"><b>-o</b>, <b>--orphaned</b></p>
<p style="margin-left:18%;">check for orphaned files
(maintenance)</p>
<p style="margin-left:18%; margin-top: 1em">An orphan is an
item in a waste directory that has no corresponding
<b>.trashinfo</b> file, or vice versa. This option is
intended primarily for developers. Orphans may happen while
testing code changes or if rmw is unintentionally released
with a bug. <br>
(see also:
<https://theimpossibleastronaut.github.io/rmw-website/faq.html#dot_trashinfo>)</p>
<p style="margin-left:9%;"><b>-f</b>, <b>--force</b></p>
<p style="margin-left:18%;">allow purging of expired
files</p>
<p style="margin-left:18%; margin-top: 1em">By default,
force is not required to enable the purge feature. If you
would like to require it, add ’force_required’
to your config file.</p>
<p style="margin-left:9%;"><b>--empty</b></p>
<p style="margin-left:18%;">completely empty (purge) all
waste directories</p>
<p style="margin-left:9%;"><b>-r</b>, <b>-R</b>,
<b>--recursive</b></p>
<p style="margin-left:18%;">option used for compatibility
with rm (recursive operation is enabled by default)</p>
<p style="margin-left:9%;"><b>--top-level-bypass</b></p>
<p style="margin-left:18%;">bypass protection of top-level
files (added in v0.9.0)</p>
<p style="margin-left:9%;"><b>-v</b>, <b>--verbose</b></p>
<p style="margin-left:18%;">increase output messages</p>
<p style="margin-left:9%;"><b>-w</b>, <b>--warranty</b></p>
<p style="margin-left:18%;">display warranty</p>
<p style="margin-left:9%;"><b>-V</b>, <b>--version</b></p>
<p style="margin-left:18%;">display version and license
information</p>
<h3>RESTORING
<a name="RESTORING"></a>
</h3>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="9%"></td>
<td width="27%">
<p style="margin-top: 1em"><b>-z</b>, <b>--restore</b>
FILE(s)</p> </td>
<td width="64%">
</td></tr>
</table>
<p style="margin-left:18%; margin-top: 1em">To restore
items, specify the path to them in the <WASTE>/files
directory (wildcards ok).</p>
<p style="margin-left:18%; margin-top: 1em">When restoring
an item, if a file or directory with the same name already
exists at the destination, the item being restored will have
a time/date string (formatted as "_%H%M%S-%y%m%d")
appended to it (e.g. ’foo_164353-210508’).</p>
<p><b>-s</b>, <b>--select</b></p></table>
<p style="margin-left:18%;">select files from list to
restore</p>
<p style="margin-left:18%; margin-top: 1em">Displays a list
of items in your waste directories. You can use the
left/right cursor keys to switch between waste directories.
Use the space bar to select the items you wish to restore,
then press enter to restore all selected items.</p>
<p style="margin-left:9%;"><b>-u</b>,
<b>--undo-last</b></p>
<p style="margin-left:18%;">undo last move</p>
<p style="margin-left:18%; margin-top: 1em">Restores files
that were last rmw’ed</p>
<p style="margin-left:9%;"><b>-m</b>,
<b>--most-recent-list</b></p>
<p style="margin-left:18%;">list most recently rmw’ed
files</p>
<h2>ENVIRONMENT
<a name="ENVIRONMENT"></a>
</h2>
<p style="margin-left:9%; margin-top: 1em">These variables
are intended only to be used for testing. See the
code-testing page on the rmw website for more details.
<b><br>
RMW_FAKE_HOME <br>
RMW_FAKE_YEAR</b></p>
<h2>FILES
<a name="FILES"></a>
</h2>
<p style="margin-left:9%; margin-top: 1em">On some systems,
$HOME/.config and $HOME/.local/share may be replaced with
$XDG_CONFIG_HOME and $XDG_DATA_HOME <i><br>
$HOME/.config/rmwrc</i></p>
<p style="margin-left:18%;">configuration file</p>
<p style="margin-left:9%;"><i>$HOME/.local/share/rmw/purge-time</i></p>
<p style="margin-left:18%;">text file that stores the time
of the last purge</p>
<p style="margin-left:9%;"><i>$HOME/.local/share/rmw/mrl</i></p>
<p style="margin-left:18%;">text file containing a list of
items that were last rmw’ed</p>
<h2>NOTES
<a name="NOTES"></a>
</h2>
<p style="margin-left:9%; margin-top: 1em">rmw will not
move items from one file system to another. If you try to
rmw a file but don’t have a waste directory defined in
your configuration file that matches the file system on
which it resides, rmw will refuse to do anything with
it.</p>
<h3>DESKTOP INTEGRATION
<a name="DESKTOP INTEGRATION"></a>
</h3>
<p style="margin-left:9%; margin-top: 1em">Items will be
moved to a waste basket in the same manner as when using the
"move to trash" option from your desktop GUI. They
will be separated from your desktop trash by default; or if
you wish for them to share the same "trash"
directory, uncomment the line (in your config file):</p>
<p style="margin-left:9%; margin-top: 1em">(Note that this
does not apply to MacOS; while rmw is yet unable to
integrate with the desktop trash directory, you’ll
still be able to use the default Waste directory.)</p>
<p style="margin-left:18%; margin-top: 1em">WASTE =
$HOME/.local/share/Trash</p>
<p style="margin-left:9%; margin-top: 1em">then comment out
the line</p>
<p style="margin-left:18%; margin-top: 1em">WASTE =
$HOME/.local/share/Waste</p>
<p style="margin-left:9%; margin-top: 1em">You can reverse
which directories are enabled at any time if you ever change
your mind. If both directories are on the same filesystem,
rmw will use the directory listed first in your config
file.</p>
<p style="margin-left:9%; margin-top: 1em">It can be
beneficial to have them both uncommented. If your desktop
trash directory (˜/.local/share/Trash) is listed after
the rmw default (˜/.local/share/Waste) and uncommented,
rmw will place newly rmw’ed items into the default,
and it will purge expired files from both.</p>
<p style="margin-left:9%; margin-top: 1em">When
rmw’ing an item, if a file or directory with the same
name already exists in the waste (or trash) directory, it
will not be overwritten; instead, the current file being
rmw’ed will have a time/date string (formatted as
"_%H%M%S-%y%m%d") appended to it (e.g.
’foo_164353-210508’).</p>
<h3>REMOVABLE MEDIA
<a name="REMOVABLE MEDIA"></a>
</h3>
<p style="margin-left:9%; margin-top: 1em">The first time
rmw is run, it will create a configuration file. Waste
directories will be created automatically (Except for when
the ’,removable’ option is used; see below)
e.g., if ’$HOME/.local/share/Waste’ is
uncommented in the config file, these two directories will
be created:</p>
<p style="margin-left:18%; margin-top: 1em">$HOME/.local/share/Waste/files
<br>
$HOME/.local/share/Waste/info</p>
<p style="margin-left:9%; margin-top: 1em">If a WASTE
directory is on removable media, you may append
’,removable’. In that case, rmw will not try to
create it; it must be initially created manually. When rmw
runs, it will check to see if the directory exists (which
means the removable media containing the directory is
currently mounted). If rmw can’t find the directory,
it is assumed the media containing the directory isn’t
mounted and that directory will not be used for the current
run of rmw.</p>
<p style="margin-left:9%; margin-top: 1em">With the media
mounted, once you manually create the waste directory for
that device (e.g. "/mnt/flash/.Trash-$UID") and
run rmw, it will automatically create the two required child
directories "files" and "info".</p>
<h2>EXAMPLES
<a name="EXAMPLES"></a>
</h2>
<h3>RESTORING
<a name="RESTORING"></a>
</h3>
<p style="margin-left:9%; margin-top: 1em">rmw -z
˜/.local/share/Waste/files/foo <br>
rmw -z ˜/.local/share/Waste/files/bars*</p>
<h3>CONFIGURATION
<a name="CONFIGURATION"></a>
</h3>
<p style="margin-left:9%; margin-top: 1em">WASTE=/mnt/flash/.Trash-$UID,
removable</p>
<p style="margin-left:18%;">When using the removable
attribute, you must also manually create the directory</p>
<p style="margin-left:9%;">expire_age = 45</p>
<p style="margin-left:18%;">rmw will permanently delete
files that have been in the waste (or trash) for more than
45 days.</p>
<h2>AUTHORS
<a name="AUTHORS"></a>
</h2>
<p style="margin-left:9%; margin-top: 1em">Project Manager:
Andy Alt <br>
The RMW team: see AUTHORS.md</p>
<h2>REPORTING BUGS
<a name="REPORTING BUGS"></a>
</h2>
<p style="margin-left:9%; margin-top: 1em">Report bugs to
<https://github.com/theimpossibleastronaut/rmw/issues>.</p>
<h2>COPYRIGHT
<a name="COPYRIGHT"></a>
</h2>
<p style="margin-left:9%; margin-top: 1em">Copyright ©
2012-2024 Andy Alt</p>
<p style="margin-left:9%; margin-top: 1em">License GPLv3+:
GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>. <br>
This is free software: you are free to change and
redistribute it. There is NO WARRANTY, to the extent
permitted by law.</p>
<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>
<p style="margin-left:9%; margin-top: 1em">mv(1), rm(1),
rmdir(1)</p>
<p style="margin-left:9%; margin-top: 1em">Full
documentation at:
<https://theimpossibleastronaut.github.io/rmw-website/></p>