Computer problems,Computer help
*AX SOFT>>>Programming & Design

Unix help!!?


What is the difference between hardlink and symbolic link and what is it related to inode?

Files in Unix filesystems use inodes as structures that hold the actual file data on disks. inode number uniquely identifies a physical file on disk.

Hard links are pretty much multiple names for the same physical file represented by the same inode. For example, file /home/bobby/doc1.txt may refer to the same physical file as /home/jimmy/doc88.txt if you make hard link. If I am Bobby and I delete doc1.txt, doc88.txt will still exist, and the other way round. The two (or more) hard links are equal for all file operations and are seen as regular files by the OS.

Symbolic links are just labels that redirect to another file by name, not by physical inode number. They are not unlike Windows shortcuts. Symbolic link is a special type of files that holds the name of another file or directory.
The other file or directory may not exist, in which case symbolic link is considered broken.

Multiple hard links for the same file can only exist within one filesystem. Symbolic links may span across filesystems.

Renaming or deleting file that is a target of symbolic link will break the symbolic link.
Renaming or deleting a file that is hardlinked under another name will not have any effect on other names.

It is not mentioned very often, but hard links do exist in Windows on NTFS filesystems.

a hardlink is actually the document/object a symbolic link is similar to placing a shortcut on a PC desktop (or alias on a Mac) it's not the object itself it just points to the actual object.

Tags
  General - Computers & Internet   Software   Security   Programming & Design   Facebook   Flickr   Google   MSN   MySpace
Related information
  • Entering words in to C++?

    It's as simple as this, in C++: string s; cin >> s;

    ...
  • Does Gimp work on Vista?

    GIMP should run on any NT-based version of Windows (NT4, 2000, XP or Vista). Older GIMP versions (2.0.x) could also work with older versions of Windows such as Windows 95 but they are not supported...

  • How can I have a link to a flash file (.swf) open in a new window on my website?

    When you link to the .swf you can use target="blank" in the href.... <A HREF="link.swf" target="_blank"> This will force the page to open in a new window.....

  • Error C4430: missing type specifier - int assumed. Note: C++ does not support default-int?

    main() ...should be... int main(void) ...aside from that, you should probably work on understanding how "else if" works.

    ...
  • Open source function... Or how to do this conversion?

    I recommend the open source CxImage library located at

    ...
  • Can anybody tell me what font this is?

    It's a version of DIN. See ...

  • I do I exclude myself from being counted as a hit on my website?

    FOR GOOGLE ANALYTICS ...

  • What is the best sample rate and bit depth to embed sound effects into Flash for a website game?

    16bit 44.1 for music, going down to 8bit 22 for sound effects, consider using the sound FX in mono to conserve space (most people won't notice).

    ...
  •  

    Categories--Copyright/IP Policy--Contact Webmaster