dupe
—
duplicate a file quickly
This utility is always called by
portfix(1),
but sometimes it is useful in its own right.
dupe
takes exactly one argument, a path to
a file. It will duplicate the [original] file to
"<original>.orig" unless there is already an existing file
with this exact name. In that case, the target file name will be
"<original>.intermediate" and any existing file of that name
will be unconditionally overwritten.
dupe
will abort if zero or more than one argument is
given, or if [original] is not a path to a valid regular file.