Re: Hard linked files cannot be modified
Re: Hard linked files cannot be modified
- Subject: Re: Hard linked files cannot be modified
- From: Hamish Allan <email@hidden>
- Date: Thu, 17 Nov 2005 12:14:50 +0000
On Wed, 16 Nov 2005 00:28:23 -0800, Prady K <email@hidden> wrote:
Before ln
=======
-rw-r--r-- 1 admin admin 20 Nov 16 00:25 test.txt
After ln
=======
-rw-r--r-- 2 admin admin 20 Nov 16 00:25 test.txt
-rw-r--r-- 2 admin admin 20 Nov 16 00:25 testlink.txt
After editing testlink.txt in TextEdit
=======
-rw-r--r-- 1 admin admin 20 Nov 16 00:25 test.txt
-rw-r--r-- 1 admin admin 27 Nov 16 00:26 testlink.txt
It would not surprise me at all if TextEdit (indirectly) uses -
[NSData writeToFile:@"testlink.txt" atomically:YES] which will first
write the file to /tmp/foo.txt, then delete the original testlink.txt
and rename /tmp/foo.txt to testlink.txt. Presumably vi is doing
something similar as well.
Best wishes,
Hamish
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden