I just noticed that the link between .. and the parent dir is hardlink, they have the same inode number:
starpinker@host /home/starpinker/unix $ ls -ail
8200794 drwxrwxr-x 2 starpinker starpinker 4096 Aug 23 11:22 .
1409238 drwxrwxr-x 2 starpinker starpinker 4096 Aug 23 11:22 ..
where the inode number of /home/starpinker/unix
is 8200794
, and the inode number of /home/starpinker
is exactly 1409238
.
I have a question on this:
The hardlink cannot be create across different file systems. Then what if the parent directory and child directory are in different file systems? For example in my case, if the /home/starpinker
and /home/starpinker/unix
are in different file system, the unix is just a mount point, then will the link between /home/starpinker/unix/..
and /home/starpinker
still be hardlink?
/
which is..
for it. Don't know how that works though. If you don't get an answer here after a while, try flagging for migration to U&L. The question is on topic on both sites and is more than welcome to stay here, there are just more hard core *nix experts on U&L.