On Mon, 2005-05-16 at 09:06 -0600, Wade Preston Shearer wrote: > I have read the man page but am still confused. What is the > difference between hard and software links. I have tested both and > it > doesn't make sense to me. Hard links don't seem to be links at all.
That would be a "soft" link, not a "software" link. They're all software after all. Every file starts with an inode. That's the basic building block of files. They're small, usually 4k or so, and you string together a bunch of them to make larger files. A file is basically just a collection of inodes, and the file name is tied to the first inode. Well, when you create a hard link you just make another file that points to that first inode. Same data, just a different name. One important point about hard links is that since an inode is only deleted when all references to it are removed, adding more hard links prevents the file from being deleted. All hard links have to be removed before the file is gone. And since inodes are specific to a filesystem, they can't cross boundaries, ie. you can't link across mount points. Soft links are files in and of themselves. The content of the file is basically the name of the file they point to. The act the opposite of hard links in regards to deleting and mount points. One important point to remember is that file permissions are tied to the inode, not to the file names. Changing permission on a hard link will change the permission on every hard link to that file. Soft links don't even bother with permissions but rather push that back to the linked file. That's why they always show up with "rwxrwxrwx" permissions. Corey
signature.asc
Description: This is a digitally signed message part
.===================================. | This has been a P.L.U.G. mailing. | | Don't Fear the Penguin. | | IRC: #utah at irc.freenode.net | `==================================='
