Consider the following use of cp -p to create an identical copy (identical
in content and in timestamps, etc.):

# echo xxx > jnk
# ls --full-time jnk
-rw-------  1 root root 4 2008-01-31 18:40:27.879358240 -0800 jnk
# cp -p jnk jnkcopy
# ls --full-time jnk*
-rw-------  1 root root 4 2008-01-31 18:40:27.879358240 -0800 jnk
-rw-------  1 root root 4 2008-01-31 18:40:27.879358000 -0800 jnkcopy
# ls --version
ls (coreutils) 5.2.1
Written by Richard Stallman and David MacKenzie.

Copyright (C) 2004 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.
#

Note that the timestamp values are NOT the same.

I ran into this when (trying) to use cp -p as a way of remembering when
the original version of a file was created (i.e., I later then compared
the timestamps of jnk and jnkcopy ... but due to the loss of precision
in the copy, they will rarely be equal).

Ray Liere


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to