Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Lightning/1.0b2 Thunderbird/3.1.7
Hello
The attachment has this same text but might be easier to read than an email.
I don't know if this is a NTFS-3g bug, or a coreutils cp bug, or
neither, or both.
I've asked the <address@hidden> list, which hasn't been able to
help apart from confirming that someone else has the same problem.
Problem
Trying to cp -pu from an NTFS partition to an ext3 partition, the
timestamps look OK, both with terminal ls -l and in nautilus (Date
Modified and Date Accessed).
The -u option says that the same file should not get copied again unless
it's changed.
But it does get copied again, and again
Just to remind,
-p same as --preserve=mode,ownership,timestamps
-u, --update copy only when the SOURCE file is newer than the
destination file or when the destination file is missing
So here's the longer version with too many details.
For a couple of years I've been doing
cp -puv -t $dest $source
from one ext3 partition to another, no problem.
But now I've copied my whole data disk to an NTFS partition on a USB
portable hard drive. NTFS so I can use it at work.
I want to copy files from this NTFS partition to an ext3 destination
with timestamps intact, so that next week when I do the same thing, I
only copy new or changed files.
Demo* code is
source=/media/data/aaa_S500_data/* # the NTFS partition
dest='/home/garry/Desktop/junk' # a ext3 partition
cp -puv -t $dest $source
Demo* Really I look at 30GB and 20,000 files, that's why I don't want
to be copying the same thing repeatedly.
Here is a demo source directory
address@hidden:~$ ls -l /media/data/aaa_S500_data/
total 64
-rwxrwxrwx 1 garry garry 38254 2010-12-02 06:20 elephantGreen.ico
-rwxrwxrwx 1 garry garry 5978 2010-10-25 17:27 elephant.ico
-rwxrwxrwx 1 garry garry 69 2010-11-30 05:55 readme.txt
-rwxrwxrwx 1 garry garry 766 2002-10-14 04:27 wdlogo.ico
-rwxrwxrwx 1 garry garry 5978 2010-10-25 17:27 wooly-mammoth.ico
address@hidden:~$
So into an empty directory, '/home/garry/Desktop/junk' I copy
address@hidden:~$ cp -puv -t '/home/garry/Desktop/junk'
/media/data/aaa_S500_data/*
address@hidden:~$
Then without changing any files in $source, and if I do
cp -puv -t '/home/garry/Desktop/junk' /media/data/aaa_S500_data/*
again, nothing should be copied.
But the two files that were created / altered on the NTFS partition
_AFTER_ it got created with gparted & partimage get copied again.
but that made no difference.
What I'm using:-
ubuntu 10.04
ntfs-3g 2010.3.6 #came with ubuntu
ntfs-3g 2010.10.2 #installed today
GNU Bash-4.1
cp in GNU coreutils 7.4
So is this a proper bug that I should put on launchpad? Looks like it to
me, but I'm amazed if nobody else found it first.