[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cp -i: "sucker Holmes" questions

From: Dan Jacobson
Subject: cp -i: "sucker Holmes" questions
Date: Mon, 13 Nov 2006 00:19:10 +0800

Seen on Debian coreutils 5.97-5:
   $ cp -i b a
   cp: overwrite `a', overriding mode 0644? y
   cp: cannot create regular file `a': Permission denied

The message "overriding mode 0644?" does not drive home the real
problem, which is a ownership problem I suppose, so the message could
be improved.

However, why fool the user into needing to respond if the command is
guaranteed to fail anyway?! Just tell the user to try again with the
appropriate extra switches, and don't bother with the "sucker Holmes"
questions.  Improve the algorithm to do the check before instead of
after the question, or something.

   $ ls -dl ? .
   drwxr-xr-x 2 jidanni jidanni 60 2006-11-07 01:30 .
   -rw-r--r-- 1 root    root     0 2006-11-07 01:29 a
   -rw-r--r-- 1 jidanni jidanni  0 2006-11-07 01:29 b
   $ mv -i b a
   mv: overwrite `a', overriding mode 0644? y
Perhaps improve this message too.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]