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++.
精彩评论