... 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?
In reply to Re^2: How does rename() work on read-only files?
by j41r
in thread How does rename() work on read-only files?
by j41r
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |