Why is it possible to create symbolic links across file system boundaries?

in Categories last updated August 28, 2006

Symbolic links link by pathname rather than inode number. As you know, each pathname is a unique file on a system. Because of this, it is possible to create symbolic links across file system boundaries. Try to create symbolic links using following command:

$ touch /home/you/file1
# ln -s /home/you/file1 /tmp/file2

Find out inode of both file1 and file2

# ls -i /home/you/file1

1567789

# ls -i /tmp/file2

1567795
As you can see inode number are unique to each file. So it is possible to create symbolic links across file system boundaries. Please note that in above example both /tmp and /home are two different file systems.

See also:

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Share this on (or read 0 comments/add one below):