Labels

hpunix (63) marathi kavita (52) linux (21) solaris11 (11) AWS (5) numerology (5)

Tuesday, July 15, 2014

Hard Links and Soft Links

Hard Links and Soft Links:

Hard links are created with the same ownerships and permissions as the file or directory to which they are linked. If ownership or permissions are changed on a link or file, the same changes appear on
corresponding hard links. The ln command does not permit hard links to a directory.


2 limitations with hard links:
1. hard links cannot cross file systems.
2. Hard links cannot link directories.

Symbolic links are created with the ownership of the creator and the permissions are of the creator's current umask. Once created, the symbolic link ownership and permissions will not change, since the
mode and ownership of the symbolic link is ignored by the system.

#ln -s

To change owner & permission on soft links, you can use the -h option with chown/chgrp,


-h:     it changes the owner or group of a symbolic link. By default, the owner or group of  the target file that a symbolic link points to is changed.  



Thanks...
Kiran Jadhav

**Let's Share our knowledge and keep visiting here**

No comments:

Post a Comment