how to get directory name by inode value in c?

后端 未结 2 1182
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-21 06:09

i am tring to add a new feature to bash and the job need a func to get the directory name from the given inode value so how to got this work? i mean if there\'s some builtin fu

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-21 06:34

    List the directory and get the inode of .. then list that and find the name of the file there that has the inode you are looking for.

提交回复
热议问题