rename.1: describe interactive mode

This commit is contained in:
G.raud Meyer 2018-04-02 15:32:44 +02:00
parent 0cb2c653c3
commit 16740b0c7a
1 changed files with 13 additions and 0 deletions

View File

@ -83,6 +83,19 @@ permission to rewrite file names, the command will perform the action without
any questions. For example, the result can be quite drastic when the command
is run as root in the /lib directory. Always make a backup before running the
command, unless you truly know what you are doing.
.SH INTERACTIVE MODE
As most standard utilities rename can be used with a terminal device (tty in
short) in canonical mode, where the line is buffered by the tty and you press
ENTER to validate the user input. If you put your tty in cbreak mode however,
rename requires only a single key press to answer the prompt. To set cbreak
mode, run for example:
.RS
.PP
.nf
sh -c 'stty -icanon min 1; "$0" "$@"; stty icanon' rename -i from to files
.fi
.PP
.RE
.SH "EXIT STATUS"
.RS
.PD 0