1 |
On Tue, 28 Dec 2010 10:18:46 +0100, Remy Blank wrote: |
2 |
|
3 |
> > Ah, OK. Didn't know this. Do you know, why it does work like this? |
4 |
> |
5 |
> It initially sets the permissions to 600 presumably to limit access to |
6 |
> an unfinished copy from other users. |
7 |
> |
8 |
> The mtime must be set after copying the contents, because adding a file |
9 |
> or directory changes the mtime of the parent. |
10 |
> |
11 |
> > And does cp -a work in the same way? |
12 |
> |
13 |
> Probably yes, for the same reasons, but I haven't checked. |
14 |
|
15 |
No it doesn't. cp leaves the mtime of the directory at the time t copied |
16 |
the files into it. If you want to preserve directory timestamps, use |
17 |
rsync. |
18 |
|
19 |
|
20 |
-- |
21 |
Neil Bothwick |
22 |
|
23 |
The number one cause of computer problems is computer solutions. |