Possible Duplicate:
How to check whether two file names point to the same physical file
How can I know if two hardlinks are connected to one file from C in Linux.
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use
statorfstat. Thestatstructure they fill out contains the inode number. If the two are connected, thest_inofields should have the same value.Since inode numbers are only unique to a device you’ll also need to check the device ID (
st_dev).