• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Hard linked files cannot be modified
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Hard linked files cannot be modified


  • Subject: Hard linked files cannot be modified
  • From: Prady K <email@hidden>
  • Date: Wed, 16 Nov 2005 00:28:23 -0800

Hi

Apologies if this posting is out of the scope of this mailing list. But I could not find any better mailing list to post this.

I have a sort of newbie question about hard links to a file. I create a hard link to image file using ln. After this I cannot modify the original file in Preview or any other application for that matter. The Preview app in OS X just says document cannot be saved. After that even after I unlink the file the original file also cannot be modified at all. I understand the concept of the link but I am wondering why it is not allowing to modify the files that have being hard linked.

However if I type a text file using vi editor and then create a hard link to that file and then open the file using the link and edit it using TextEdit or vi it saves the file but it breaks the hard link. i.e. the link count becomes 1.

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

TIA
Prady K


_______________________________________________ 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
  • Prev by Date: Re: Continous updates from NSForm
  • Next by Date: multithread strange lockups in 10.3.9 and not tiger
  • Previous by thread: .mailbundle question
  • Next by thread: Re: Hard linked files cannot be modified
  • Index(es):
    • Date
    • Thread