开发者

How can we find the number of blocks occupied by a file from userspace

How can we find the number of blocks occupied b开发者_JAVA百科y a file from userspace ? Is there a command to do so or we need to access the inode structure and then fetch the information.

I have searched a lot on the internet but could not find a valid answer. Can you please let me know

Thanks.


ls -s

answers this question from command line.

stat(2)

answers it from C or C++.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜