2020-05-02 14:50:41 -07:00
|
|
|
.\" Manpage for bin.
|
2020-04-06 23:31:05 -07:00
|
|
|
.\" Contact bruce@bruce-hill.com to correct errors or typos.
|
2020-05-02 14:50:41 -07:00
|
|
|
.TH man 8 "6 April 2020" "0.5" "bin manual page"
|
2020-04-06 23:31:05 -07:00
|
|
|
.SH NAME
|
2020-05-02 14:50:41 -07:00
|
|
|
bin \- A shell program for FreeDesktop.org-compliant trash bin management.
|
2020-04-06 23:31:05 -07:00
|
|
|
.SH SYNOPSIS
|
2020-05-02 14:50:41 -07:00
|
|
|
.B bin
|
2020-04-06 23:31:05 -07:00
|
|
|
[\fI-h\fR|\fI--help\fR]
|
|
|
|
[\fI-V\fR|\fI--version\fR]
|
|
|
|
[\fI-v\fR|\fI--verbose\fR]
|
|
|
|
[\fI-i\fR|\fI--interactive\fR]
|
|
|
|
[\fI-f\fR|\fI--force\fR]
|
|
|
|
[\fI-r\fR|\fI-R\fR|\fI--recursive\fR]
|
2020-04-07 02:25:48 -07:00
|
|
|
[
|
2020-04-06 23:31:05 -07:00
|
|
|
[\fI-u\fR|\fI--untrash\fR]
|
2020-04-07 02:25:48 -07:00
|
|
|
|
|
2020-04-06 23:31:05 -07:00
|
|
|
[\fI-e\fR|\fI--empty\fR]
|
2020-04-07 02:25:48 -07:00
|
|
|
|
|
2020-04-06 23:31:05 -07:00
|
|
|
[\fI-E\fR|\fI--empty-all\fR]
|
2020-04-07 02:25:48 -07:00
|
|
|
|
|
2020-04-06 23:31:05 -07:00
|
|
|
[\fI-l\fR|\fI--list\fR]
|
2020-04-07 02:25:48 -07:00
|
|
|
]
|
|
|
|
[[\fI--\fR] \fIfiles...\fR]
|
2020-04-06 23:31:05 -07:00
|
|
|
|
|
|
|
.SH DESCRIPTION
|
2020-05-02 14:50:41 -07:00
|
|
|
\fBbin\fR is a small shell program that helps you send files to a trash bin
|
2020-04-06 23:31:05 -07:00
|
|
|
directory (specified by the FreeDesktop.org Trash Specification), restore
|
|
|
|
files from there, and empty the trash directory.
|
|
|
|
.SH OPTIONS
|
|
|
|
.B \-h
|
|
|
|
.B \--help
|
|
|
|
Print the command line usage and exit.
|
|
|
|
|
|
|
|
.B \-V
|
|
|
|
.B \--version
|
2020-05-02 14:50:41 -07:00
|
|
|
Print \fBbin\fR's version and exit.
|
2020-04-06 23:31:05 -07:00
|
|
|
|
|
|
|
.B \-v
|
|
|
|
.B \--verbose
|
|
|
|
Print more logging output.
|
|
|
|
|
|
|
|
.B \-i
|
|
|
|
.B \--interactive
|
|
|
|
Always ask for confirmation.
|
|
|
|
|
|
|
|
.B \-f
|
|
|
|
.B \--force
|
|
|
|
Never ask for confirmation.
|
|
|
|
|
|
|
|
.B \-r
|
|
|
|
.B \-R
|
|
|
|
.B \--recursive
|
|
|
|
Ignored. (For compatibility with \fBrm -r\fR)
|
|
|
|
|
|
|
|
.B \-u
|
|
|
|
.B \--untrash
|
2020-04-07 02:25:48 -07:00
|
|
|
Restore the most recently deleted file(s) matching the given path(s). (see:
|
|
|
|
\fBNOTE ON DELETION TIMES\fR)
|
2020-04-06 23:31:05 -07:00
|
|
|
|
|
|
|
.B \-e
|
|
|
|
.B \--empty
|
2020-04-07 02:25:48 -07:00
|
|
|
Permanently erase the most recently deleted file(s) matching the given path(s)
|
|
|
|
from the trash. (see: \fBNOTE ON DELETION TIMES\fR)
|
2020-04-06 23:31:05 -07:00
|
|
|
|
|
|
|
.B \-E
|
|
|
|
.B \--empty-all
|
2020-04-07 02:25:48 -07:00
|
|
|
Empty all files from the trash. Since there is a per-mount-point trash directory,
|
|
|
|
any additional path arguments will be used to empty trash from specified mount
|
|
|
|
points. Default is the current directory.
|
2020-04-06 23:31:05 -07:00
|
|
|
|
|
|
|
.B \-l
|
|
|
|
.B \--list
|
2020-04-07 00:01:42 -07:00
|
|
|
List all files in the trash. The format is: \fB<Trash File>\fR, \fB<Date
|
|
|
|
Deleted>\fR, \fB<Original Path>\fR. Fields are separated by the environment
|
|
|
|
variable \fIFS\fR (default: tab) and records are separated by the environment
|
2020-04-07 02:25:48 -07:00
|
|
|
variable \fIRS\fR (default: newline). Since there is a per-mount-point trash
|
|
|
|
directory, any additional path arguments will be used to empty trash from
|
|
|
|
specified mount points. Default is the current directory.
|
2020-04-06 23:31:05 -07:00
|
|
|
|
2020-04-07 00:01:42 -07:00
|
|
|
.I files...
|
2020-04-07 02:25:48 -07:00
|
|
|
If none of \fB-u\fR, \fB-e\fR, \fB-E\fR, \fB-l\fR are specified, then delete
|
|
|
|
the given files. Otherwise, apply the appropriate action to them.
|
|
|
|
|
|
|
|
.SH NOTE ON DELETION TIMES
|
2020-05-02 14:50:41 -07:00
|
|
|
\fBbin\fR only records the deltion time with 1-second precision, so if
|
2020-04-07 02:25:48 -07:00
|
|
|
multiple files were deleted in the same second, the behavior is undefined.
|
2020-04-06 23:31:05 -07:00
|
|
|
|
|
|
|
.SH EXAMPLES
|
|
|
|
.TP
|
|
|
|
.B
|
2020-05-02 14:50:41 -07:00
|
|
|
bin foo.txt baz.txt
|
|
|
|
Send \fIfoo.txt\fR and \fIbaz.txt\fR to the trash bin.
|
2020-04-06 23:31:05 -07:00
|
|
|
|
|
|
|
.TP
|
|
|
|
.B
|
2020-05-02 14:50:41 -07:00
|
|
|
bin foo.txt && bin -u foo.txt
|
2020-04-07 02:25:48 -07:00
|
|
|
Trash a file and then untrash it.
|
2020-04-06 23:31:05 -07:00
|
|
|
|
|
|
|
.TP
|
|
|
|
.B
|
2020-05-02 14:50:41 -07:00
|
|
|
bin -E
|
2020-04-06 23:31:05 -07:00
|
|
|
Empty the trash.
|
|
|
|
|
2020-04-07 02:25:48 -07:00
|
|
|
.TP
|
|
|
|
.B
|
2020-05-02 14:50:41 -07:00
|
|
|
bin -E /mnt
|
2020-04-07 02:25:48 -07:00
|
|
|
Empty the trash on the filesystem mounted at /mnt
|
|
|
|
|
|
|
|
.TP
|
|
|
|
.B
|
2020-05-02 14:50:41 -07:00
|
|
|
bin -E $(awk '{print $2}' /proc/mounts)
|
2020-04-07 02:25:48 -07:00
|
|
|
Empty all trash directories on all filesystems on the system.
|
|
|
|
|
2020-04-06 23:31:05 -07:00
|
|
|
.SH AUTHOR
|
|
|
|
Bruce Hill (bruce@bruce-hill.com)
|