On Mon, May 16, 2005 at 10:34:39AM -0600, Wade Preston Shearer wrote:
> I now understand why I was so confused. The text editor that I was  
> using was not smart enough to follow the link and was writing a new  
> file over the top of the hard link instead of following the path to  
> the original file.

Er, are you sure?

A hard link consists of two file names pointing to the same physical
file. By definition,

ln foo bar
diff foo bar

should always return no differences.

Also, your editor should be utterly linkage-agnostic. It shouldn't
know or care how many links there are to a given file, or whether the
file name you give it is a symlink or not.

It's possible the following occured:

* Editor is given a file name to edit, say "foo".

* Editor moves the file of that name to a backup file name, say "foo~".

* Editor now opens (creates) a new file with the original name.

It's a common algorithm for Mess-DOS editors, but it breaks on most
Unix file systems and NTFS precisely because it ignores the side
effects for both symlinks and hard links. If that's the case, you have
a bug in your editor.

-- 

Charles Curley                  /"\    ASCII Ribbon Campaign
Looking for fine software       \ /    Respect for open standards
and/or writing?                  X     No HTML/RTF in email
http://www.charlescurley.com    / \    No M$ Word docs in email

Key fingerprint = CE5C 6645 A45A 64E4 94C0  809C FFF6 4C48 4ECD DFDB

Attachment: pgpuzlLCXcpd5.pgp
Description: PGP signature

.===================================.
| This has been a P.L.U.G. mailing. |
|      Don't Fear the Penguin.      |
|  IRC: #utah at irc.freenode.net   |
`==================================='

Reply via email to