开发者

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

开发者 https://www.devze.com 2022-12-18 09:09 出处:网络
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.

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

精彩评论

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

关注公众号