On Sun, 30 Aug 2009, James R. Van Zandt wrote:

For the help text, here are some alternatives:

   if DEST is a directory, then delete it first

This isn't what -T does. If DEST is an empty directory then it's overwritten with the rename(2) system call. Otherwise mv will fail e.g. if SOURCE isn't a directory or DEST is non-empty.

This is short, but doesn't handle the case of DEST being a
symbolic link

   if DEST is a directory, or a symbolic link to a directory, then delete it 
first

This isn't what -T does either. If DEST is a symlink it isn't deleted, merely "clobbered" by mv. It's the difference between

rename("file", "DEST/file")  = 0
and
rename("file", "DEST")       = 0

For the short --help description I'd try something like

"disable special directory handling for DEST"


Cheers,
Phil


Reply via email to