The inode number is unique within a particular filesystem.
-i switch print the index number of each file
hard links point to an inode, and inodes are only unique within a particular file system, hard links cannot cross file systems(different partitions or hard disks).
You can create hard links only for files and not for directories. The exception is the special directory entries in a directory for the directory itself and for its parent (. and ..)
ln
command to create additional hard links to an existing file (but not to a directory, even though the system sets up . and .. as hard links).ln
command with the -s
option creates soft links. Soft links use file or directory names, which may be relative or absolute. If you are using relative names, you will usually want the current working directory to be the directory where you are creating the link. Otherwise, the link you create will be relative to another point in the file system.find
command and the -samefile
option with a file name or the -inum
option with an inode number:find
command to search for symbolic links using the -type l
find expression:genisoimage
, will replace an older command name, but the old name (mkisofs) is kept as a link to the new command.rm
, unlink
, and find
commands. rm
rm
command followed by the symbolic link name as an argument: rm symlink_name
rm
you can delete more than one symbolic links at once. To do that pass the names of the symlinks as arguments, separated by space: rm symlink1 symlink2
Try -i to get confirmed./
, the rm
command assumes that the file is a directory. The error happens because, when used without the -d
or -r
option, rm
cannot delete directories.unlink
!
Unlike rm, unlink accepts only a single argument.unlink symlink_name
.
find /path/to/directory -xtype l
rm
or unlink
or use the -delete
option of the find
command: find /path/to/directory -xtype l -delete
rm
or unlink
command followed by the name of the symlink as an argument. When removing a symbolic link that points to a directory do not append a trailing slash to the symlink name.