This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cp: skipping file `...', as it was replaced while being copied


I am currently being frustrated by cp's current feature set.

Specifically, I am getting
$ cp -rf directory1 directory2
cp: skipping file `...', as it was replaced while being copied
cp: skipping file `...', as it was replaced while being copied
cp: skipping file `...', as it was replaced while being copied
cp: skipping file `...', as it was replaced while being copied
cp: skipping file `...', as it was replaced while being copied
cp: skipping file `...', as it was replaced while being copied
...
messages, and cp is not copying files for me.

So, first off... ok, this is a feature which I am sure is useful for
some people.  But I feel that it should be an option.  If I am copying
a snapshot of a rapidly changing directory, grabbing a copy of a file
that's being changed could be exactly what I want, and the burden is
on me to deal with the result.  Alternatively, in this case, the
content is not being changed at all (which would be evident if cp ran
through the file twice performing an md5sum on the file during the
copy and again after the file copy had been made).  And note also that
timestamps can be changed by touch without changing the contents of
the file (but touch does not seem to induce this behavior).  And note
also that on a real unix system, when you have opened an inode, the
name which you used to find that inode can change (or be eliminated),
and that's not a valid reason to not copy the file -- you still have
access to the original data as long as you retain the original file
handle.  And I am sure similar reasoning applies to any other
information that might be yielded by stat.

I do not mind cp exiting with a non-zero return code, but refusing to
copy a file that I specifically asked it to copy?  If I wanted to not
copy a file, I could use /bin/true instead of /bin/cp ...

Second, I am using an up-to-date instance of cygwin, and this is
happening to me on a networked file system (which I do not
administer).

Finally, personally, I would prefer to not have to mount anything.  I
currently do not have to mount the file system (I use symlinks), and
it seems wrong to have go and deal with mounts, to work around a
feature which has cp doing something other than copying files.

That said, here's what getVolInfo says about a couple file systems
which have this issue:

$ /usr/lib/csih/getVolInfo /h/.
Device Type        : 7
Characteristics    : 10
Volume Name        : <nas_facelift>
Serial Number      : 2684354636
Max Filenamelength : 255
Filesystemname     : <NTFS>
Flags              : 4000e
  FILE_CASE_SENSITIVE_SEARCH  : FALSE
  FILE_CASE_PRESERVED_NAMES   : TRUE
  FILE_UNICODE_ON_DISK        : TRUE
  FILE_PERSISTENT_ACLS        : TRUE
  FILE_FILE_COMPRESSION       : FALSE
  FILE_VOLUME_QUOTAS          : FALSE
  FILE_SUPPORTS_SPARSE_FILES  : FALSE
  FILE_SUPPORTS_REPARSE_POINTS: FALSE
  FILE_SUPPORTS_REMOTE_STORAGE: FALSE
  FILE_VOLUME_IS_COMPRESSED   : FALSE
  FILE_SUPPORTS_OBJECT_IDS    : FALSE
  FILE_SUPPORTS_ENCRYPTION    : FALSE
  FILE_NAMED_STREAMS          : TRUE
  FILE_READ_ONLY_VOLUME       : FALSE
  FILE_SEQUENTIAL_WRITE_ONCE  : FALSE
  FILE_SUPPORTS_TRANSACTIONS  : FALSE

$ /usr/lib/csih/getVolInfo /p/.
Device Type        : 7
Characteristics    : 10
Volume Name        : <New Volume>
Serial Number      : 1084808073
Max Filenamelength : 255
Filesystemname     : <NTFS>
Flags              : 700ff
  FILE_CASE_SENSITIVE_SEARCH  : TRUE
  FILE_CASE_PRESERVED_NAMES   : TRUE
  FILE_UNICODE_ON_DISK        : TRUE
  FILE_PERSISTENT_ACLS        : TRUE
  FILE_FILE_COMPRESSION       : TRUE
  FILE_VOLUME_QUOTAS          : TRUE
  FILE_SUPPORTS_SPARSE_FILES  : TRUE
  FILE_SUPPORTS_REPARSE_POINTS: TRUE
  FILE_SUPPORTS_REMOTE_STORAGE: FALSE
  FILE_VOLUME_IS_COMPRESSED   : FALSE
  FILE_SUPPORTS_OBJECT_IDS    : TRUE
  FILE_SUPPORTS_ENCRYPTION    : TRUE
  FILE_NAMED_STREAMS          : TRUE
  FILE_READ_ONLY_VOLUME       : FALSE
  FILE_SEQUENTIAL_WRITE_ONCE  : FALSE
  FILE_SUPPORTS_TRANSACTIONS  : FALSE

-- 
Raul

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]