[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "-T" option help text
From: |
Philip Rowlands |
Subject: |
Re: "-T" option help text |
Date: |
Mon, 31 Aug 2009 11:59:49 +0100 (BST) |
User-agent: |
Alpine 1.10 (DEB 962 2008-03-14) |
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