4.0;chn (change_name), revision 4.0, 81/03/23
CHN (CHANGE_NAME) -- Change an object's name.
usage: CHN old_name [new_name] [-D | -Y] [-U] [-S] {CL}
FORMAT
CHN old_name [new_name] [old_name [new_name] ...] [options]
CHN changes the name of a file, directory, or link. CHN works with the
rightmost component ("leafname") of the old name (see EXAMPLES).
This command cannot be used to change the name of a directory embedded in a
complete pathname, which would result in the file's relocation to some other
part of the naming tree. For instance,
$ chn //et/mary/letters //et/fred/letters
is illegal. Use the MVF (MOVE_FILE) command for that operation.
ARGUMENTS
Multiple old_name/new_name pairs and pathname wildcarding are permitted.
old_name
(required) Specify the current pathname of the object to be renamed.
new_name
(optional) Specify the new name of the object. The new name may be
derived from the old name. New_name may be omitted
entirely if -D, -Y,or -U are specified. Otherwise, some
portion of it is required. Names may be 1 to 32 characters
long.
Default if omitted: derive new_name from old_name.
OPTIONS
-D Append today's date (month and day) to new_name in the form
"new_name.mm.dd"
-Y Append today's date (year, month, and day) to new_name in
the form "new_name.yy.mm.dd"
-U Force new_name to be unique by appending a sequence number
to the end of the name until it becomes unique.
-S List names changed on standard output.
This command uses the command line parser, and so also accepts the standard
command options listed in HELP CL.
EXAMPLES
1. $ chn fritz henri Change the name "fritz" to "henri" in
the current working directory.
2. $ chn henri mike peter paul Change henri to mike and peter to paul.
3. $ chn (a b c) =.zorp Change a b and c to a.zorp, b.zorp and
c.zorp.
4. $ chn /my/stuff/lips red_lips Change the file "lips" to "red_lips"
in the directory "/my/stuff."
5. $ chn henri -d Change henri to henri.mm.dd where
henri.07.19 mm is the current month (01-12) and
dd is the current date (01-31).
6. $ chn joe -u Change joe by appending sequence number
joe.1 to end of file name.