Hello,
I would like to know what is the difference between a symbolic link and a physical link and at the same time can we create a link between / bin / bash and / bin / monshell ? Is it possible or impossible and how to remedy the problem?
Hello,
I would like to know what is the difference between a symbolic link and a physical link and at the same time can we create a link between / bin / bash and / bin / monshell ? Is it possible or impossible and how to remedy the problem?
Unix file is represented by a file name and an inode.inode will contain among others the permission and address of the data. The file name will help when he has to retrieve an inode number to access the data. A hard link is when two (or more) files point to the same inode. Removing one of two files, the other remains valid. Whereas a symlink is different in the sense that the original file will point to the inode containing the data, and the symlink will point him in an inode whose data is the path of the original file! What do when you destroyed the original file, the symlink is broken!
My friend,
I would also like to add some point on restriction for the use of hard links which are as follows:-
- You can not create a hard link that points to a file in another file system.
- You can not create a hard link that points to a directory.
Symbolic link is a shortcut and it is hardly used anywhere, For example on my system the the bash and tcsh are installed and the sh and csh are symlinks respectively on the bash and tcsh
Code:-rwxr-xr-x 1 root root 772760 Apr 12 2008 / bin / bash lrwxrwxrwx 1 root root 4 February 24, 2010 / bin / csh -> tcsh lrwxrwxrwx 1 root root 4 January 10, 2010 / bin / sh -> bash -rwxr-xr-x 1 root root 349,952 January 5, 2010 / bin / tcsh
I would like to say that you cannot create hard link between 2 different fs because the hard link is actually one more name pointing to the same inode as the original name and it is therefore necessary that the inode is in the same file system.
Bookmarks