Possible duplicate:How to check if two file names point to the same physical file
How to find out if two hard channels are associated with the same file with C in Linux.
Thank.
Use stator fstat. The structure statthey populate contains the inode number. If the two are connected, the fields st_inomust have the same value.
stat
fstat
st_ino
Since inodes are unique only to the device, you also need to check the device identifier ( st_dev).
st_dev
stat() fstat() . st_dev st_ino , .
EDIT:
, st_dev, st_ino. , . , stat :
$ stat / /boot | grep Device Device: 903h/2307d Inode: 2 Links: 23 Device: 902h/2306d Inode: 2 Links: 3
inode .
stat() fstat() , st_nlink, , . , , .
stat()
fstat()
st_nlink
You can also use
$ ls -i
It lists the inode number, which is the final unique identifier for the file.
Source: https://habr.com/ru/post/1778626/More articles:Where do the MediaTemple (dv) vhosts configuration files live? - svnnetbeans - ending php code no longer works - phpAJAX history button support without crazy - javascripthttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1778624/magento-adding-a-website-with-the-same-catalog-then-associating-products-to-new-website&usg=ALkJrhgi-uTDCwbTi21Bgeyr_c0nqyXKGwjava.awt.Robot эквивалент в OS X Cocoa? - javaComplexity 2d discrete Fourier transform - c #Implementing F # workflow constructors: handling exceptions in for..in..do constructs - f #How to create a static body with b2PolygonShape vertices - xcodeRequest DepthBuffer on OpenGL ES for iPhone - objective-cConverting from UNIX to Date String - objective-cAll Articles