in reply to Re: How does rename() work on read-only files?
in thread How does rename() work on read-only files?
... having tested this myself it is not what I see for foo. I see that foo.bak has the inode of the old foo. Are you sure of your result?
Well, maybe I was so tired that I didn't notice it was actually different. Here's what I got:
[j41r@work perl]$ rm alpha/foo.bak [j41r@work perl]$ stat -c%n:$'\t'%i alpha/foo* alpha/foo: 9353128 [j41r@work perl]$ perl -i.bak -pe 1 alpha/foo [j41r@work perl]$ stat -c%n:$'\t'%i alpha/foo* alpha/foo: 9353126 alpha/foo.bak: 9353128 [j41r@work perl]$ rm alpha/foo.bak [j41r@work perl]$ stat -c%n:$'\t'%i alpha/foo* alpha/foo: 9353126
Why did we get a different result than the one in file-dir-perms?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How does rename() work on read-only files?
by haukex (Archbishop) on Dec 11, 2018 at 10:59 UTC | |
by j41r (Beadle) on Dec 12, 2018 at 00:21 UTC | |
|
Re^3: How does rename() work on read-only files?
by hippo (Archbishop) on Dec 11, 2018 at 11:06 UTC | |
by j41r (Beadle) on Dec 12, 2018 at 00:28 UTC | |
by hippo (Archbishop) on Dec 12, 2018 at 09:26 UTC | |
by j41r (Beadle) on Dec 12, 2018 at 09:51 UTC |