rsync -vt shows directories considered?

James Berry james at jberry.us
Wed Dec 3 14:58:39 EST 2003


On Dec 2, 2003, at 6:27 PM, jw schultz wrote:

> On Tue, Dec 02, 2003 at 09:30:55AM -0800, James Berry wrote:
>> On Dec 2, 2003, at 8:52 AM, Wayne Davison wrote:
>>
>>> On Tue, Dec 02, 2003 at 06:27:37AM -0800, James Berry wrote:
>>>> But the directory inode doesn't need to be updated. It is up to 
>>>> date.
>>>
>>> If the modified time of the directory is not identical, it gets
>>> updated,
>>> just like any other file.  If it is identical, you won't see it
>>> mentioned.  Unfortunately, there's no way to tell rsync to ignore the
>>> timestamps of directories while updating the timestamps of files.
>>>
>>> ..wayne..
>>
>> Okay. So I see why the directories are being listed: the time on them
>> really is different, and it's not being updated. But shouldn't rsync 
>> be
>> setting this time? Shouldn't the time on the directory be set by 
>> rsync?
>> This is an HFS volume.
>
> Rsync should only set the time on a directory if the -t
> option is used.  Without -t the directory's mtime will not
> be set so will either be what it was before rsync ran or the
> time when the last directory modification caused by rsync or
> any other process.

Yes. But in this case I am setting the -t option. And the time on the 
directory is apparently not being set. If I run the rsync -tv command 5 
times in a row it will list the each directory (that has the wrong 
time) each time.

But I did some more investigation and have a bit more information:

(1) This happens only if I don't own the destination directory. If I 
own the directory, the time on it gets set. If I don't own the 
directory (and even though the group access gives me rwx) the time 
doesn't get set. As the same user (not owning the directory, and logged 
into the remote machine), I can touch the directory to change its date 
with no problem. This sounds like maybe we're getting closer to the 
root of the problem (or am I misunderstanding something about 
permissions or about what rsync is trying to do?).

(2) I get the "-v" output about the directory even if the -u option is 
set. Since the date on the destination directory is later than the date 
on the source directory, I'd expect not to see output about the ("more 
up to date") destination directory in that case. But I do.

Am I barking up a dead tree?

-jdb




More information about the rsync mailing list