GNU bug report logs - #7613
cp -pu NTFS problem ?bug report

Previous Next

Package: coreutils;

Reported by: Garry Trethewey <garrytre <at> bigpond.com>

Date: Sat, 11 Dec 2010 00:25:02 UTC

Severity: normal

Merged with 7612

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7613 in the body.
You can then email your comments to 7613 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#7613; Package coreutils. (Sat, 11 Dec 2010 00:25:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Garry Trethewey <garrytre <at> bigpond.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Sat, 11 Dec 2010 00:25:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Garry Trethewey <garrytre <at> bigpond.com>
To: ntfs-3g-devel <at> lists.sf.net, bug-coreutils <at> gnu.org
Subject: cp -pu NTFS problem  ?bug report
Date: Sat, 11 Dec 2010 11:00:32 +1030
[Message part 1 (text/plain, inline)]
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 <linuxsa <at> linuxsa.org.au> 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
garry <at> S500-lucid:~$ 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
garry <at> S500-lucid:~$


So into an empty directory, '/home/garry/Desktop/junk'  I copy
garry <at> S500-lucid:~$ cp -puv  -t '/home/garry/Desktop/junk'
/media/data/aaa_S500_data/*
`/media/data/aaa_S500_data/elephantGreen.ico' -> 
`/home/garry/Desktop/junk/elephantGreen.ico'
`/media/data/aaa_S500_data/elephant.ico' -> 
`/home/garry/Desktop/junk/elephant.ico'
`/media/data/aaa_S500_data/readme.txt' -> 
`/home/garry/Desktop/junk/readme.txt'
`/media/data/aaa_S500_data/wdlogo.ico' -> 
`/home/garry/Desktop/junk/wdlogo.ico'
`/media/data/aaa_S500_data/wooly-mammoth.ico' -> 
`/home/garry/Desktop/junk/wooly-mammoth.ico'
garry <at> S500-lucid:~$

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.

garry <at> S500-lucid:~$ cp -puv  -t '/home/garry/Desktop/junk' 
/media/data/aaa_S500_data/*
`/media/data/aaa_S500_data/elephantGreen.ico' -> 
`/home/garry/Desktop/junk/elephantGreen.ico'
`/media/data/aaa_S500_data/readme.txt' -> 
`/home/garry/Desktop/junk/readme.txt'
garry <at> S500-lucid:~$

and again

garry <at> S500-lucid:~$ cp -puv -t $dest $source
`/media/data/aaa_S500_data/elephantGreen.ico' -> 
`/home/garry/Desktop/junk/elephantGreen.ico'
`/media/data/aaa_S500_data/readme.txt' -> 
`/home/garry/Desktop/junk/readme.txt'



here is my /etc/fstab
proc            /proc           proc    nodev,noexec,nosuid 0       0
UUID=a49e1eb6-72bc-465d-9852-ce99403d303f /               ext3 
errors=remount-ro 0       1
UUID=f13a83d6-fdfd-4dc7-b67c-a3d47c9fd727 none            swap    sw 
       0       0
UUID=07B3B28C580F4BEA /media/data     ntfs-3g 
defaults,umask=000,uid=1000,gid=1000 0       1
#UUID=07B3B28C580F4BEA /media/data     ntfs-3g 
defaults,relatime,umask=000,uid=1000,gid=1000 0       1
#UUID=07B3B28C580F4BEA /media/data     ntfs    defaults  0       1
UUID=c1841d07-7991-4e9c-8d35-969cb49ccf28  /media/toybox_data  ext3 
defaults   0   2


I tried
touch --reference '/media/data/aaa_S500_data/newfile' 
'/home/garry/Desktop/junk/newfile'
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.


regards

------------------------------------
Garry Trethewey
------------------------------------
[prettier.txt (text/plain, attachment)]

Forcibly Merged 7612 7613. Request was from Jim Meyering <jim <at> meyering.net> to control <at> debbugs.gnu.org. (Sun, 13 Nov 2011 12:03:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 7612 <at> debbugs.gnu.org and Garry Trethewey <garrytre <at> bigpond.com> Request was from Jim Meyering <jim <at> meyering.net> to control <at> debbugs.gnu.org. (Sun, 13 Nov 2011 12:03:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 11 Dec 2011 12:24:02 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 193 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.