hmm, I am sorry, by metadata I
think I meant Indirect blocks
what I mean is, whatever shell cmds I have to get a file size.. they will give me the total disk space occuiped by the file (data + other stuff). But I want to know whats the space occupied by
data only.
ls -ls for example...
Quote:
$ ls -ls temp
104 -rwxr--r-- 1 vqw engr 101300 Nov 7 16:25 temp
Here
104 is the total physical disk space occupied by the file. As far as I understand this includes space occupied by data, metadata, Indirect blocks, (Inode) etc etc...
Sure, a file system level program might be able to give the answer.. but how can a user level program find out the number of data blocks ?
(A program might read the file and calculate the number of blocks read, but if the file has holes.. it will read those too.. )