[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
cp -iu always prompts
From: |
Becker, Paul |
Subject: |
cp -iu always prompts |
Date: |
Wed, 27 Dec 2006 14:23:18 -0500 |
Currently, "cp -ui" always prompts the user, even if nothing
is going to be attempted to be copied. I would expect to only be
prompted if the file is going to be copied. I don't think the user
should be prompted for every single file even if it is not going
to be copied anyway.
I did see the NEWS for 6.4 that states the following:
cp -i and mv -i occasionally neglected to prompt when the copy or move
action was bound to fail. This bug dates back to before
fileutils-4.0.
But I don't think this condition of "not copying a file because of
the date" is a failure. Files with newer dates would not be considered
for copy and not prompted for. The copy of data would not fail because
it is not even attempted.
This 'cp' option is good for syncing directories interactively, but I
only want to be prompted for files that actually changed and could be
updated.
(especially if the file list is large and the changes are few.)
--Thank you
------------------------------------------------------------------------
---
example on cygwin - not what I would expect
------------------------------------------------------------------------
---
% cp --version
cp (GNU coreutils) 6.7
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software. You may redistribute copies of it under the
terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering.
% ls -l a b
-rw-rw-r-- 1 pbecker Domain Users 29 Dec 27 12:27 a
-rw-rw-r-- 1 pbecker Domain Users 58 Dec 27 12:28 b
% cp -iuv a b
cp: overwrite `b'? y
% cksum a b
920498787 29 a
3888989962 58 b
%
------------------------------------------------------------------------
---
example on Redhat Linux - which works as I would expect
------------------------------------------------------------------------
---
% cp --version
cp (coreutils) 4.5.3
Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering.
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
% ls -l a b
-rw-rw-r-- 1 pbecker software 29 Dec 27 12:26 a
-rw-rw-r-- 1 pbecker software 58 Dec 27 12:27 b
% cp -iuv a b
%
---
Paul Becker
address@hidden
- cp -iu always prompts,
Becker, Paul <=