On Tue, 28 Dec 2010 10:18:46 +0100, Remy Blank wrote:

> > Ah, OK. Didn't know this. Do you know, why it does work like this?  
> 
> It initially sets the permissions to 600 presumably to limit access to
> an unfinished copy from other users.
> 
> The mtime must be set after copying the contents, because adding a file
> or directory changes the mtime of the parent.
> 
> > And does cp -a work in the same way?  
> 
> Probably yes, for the same reasons, but I haven't checked.

No it doesn't. cp leaves the mtime of the directory at the time t copied
the files into it. If you want to preserve directory timestamps, use
rsync.


-- 
Neil Bothwick

The number one cause of computer problems is computer solutions.

Attachment: signature.asc
Description: PGP signature

Reply via email to