Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the number of hardlinks

Is there some library function, or some other way, to get the hard link count of some file in Python?


1 Answers

Use st_nlink:

os.stat("foo.txt").st_nlink