-
Notifications
You must be signed in to change notification settings - Fork 0
/
brn2.1
93 lines (73 loc) · 1.81 KB
/
brn2.1
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
.TH BRN2 1
.SH NAME
brn2 \- Bulk Rename Files
.SH SYNOPSIS
brn2 [OPTIONS] -f <filename>
.TP
brn2 [OPTIONS] -- [<file1> <file2> ... ]
.SH DESCRIPTION
brn2 is a command line tool to easily mass-rename files in your preferred text
editor (e.g., vim). It will open the filenames in your text editor of choice.
You can then edit the filenames in the buffer, and the changes will take place
when you save and exit.
.SH OPTIONS
.TP
.BR -h
.BR --help
Display the help message and exit.
.TP
.BR -q
.BR --quiet
Quiet mode; suppress output messages.
.TP
.BR -v
.BR --verbose
Verbose mode; output messages (this is the default).
.TP
.BR -c
.BR --check
Check if original filenames exist before renaming.
.TP
.BR -s
.BR --sort
Disable sorting of original list.
.TP
.BR -F
.BR --fatal
Exit on first renaming error.
.TP
.BR -i
.BR --implict
Allow swapping with files which were not specified in the rename list.
.SH USAGE
.TP
.BR brn2
Rename filenames in the current working directory.
.TP
.BR brn2 " -f <filename>"
Rename filenames listed in the specified file.
.TP
.BR brn2 " <file1> <file2> ..."
Rename filenames passed as arguments.
.SH NOTES
.TP
By default, brn2 uses the $EDITOR environment variable. \
If that is not set, it defaults to vim.
.TP
.brn2 will not work for more than 2^32 renames at once.
.TP
.brn2 will not work for filenames longer than PATH_MAX (typically 4096) \
characters when reading from <filename>. Newlines in filenames are not allowed.
.TP
Filenames listed in <filename> or given as arguments that \
do not correspond to existing files will generate errors while renaming.
.TP
Filenames . and .. are ignored, as well as any filename that \
starts with .. even when listed in <filename>
.SH EXIT STATUS
.BR 1
if an error ocurred,
.BR 0
otherwise.
.SH LICENSE
.brn2 is licensed under the GNU AFFERO GENERAL PUBLIC LICENSE.