如何通过inode的价值在C获取目录的名字吗? [英] how to get directory name by inode value in c?

查看:174
本文介绍了如何通过inode的价值在C获取目录的名字吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在特林添加新功能来砸
和作业需要FUNC从给定的inode值获得目录名
所以如何得到这个工作?我的意思是,如果有在bash的源$ C ​​$ C一些内置FUNC
如果没有,任何帮助将接受

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 func in bash's source code if not , any help will be accept

推荐答案

列出目录,并获得 .. 的索引节点,然后列出找到的文件的名称那里有你正在寻找的i节点。

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.

这篇关于如何通过inode的价值在C获取目录的名字吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆