Determining actual flash usage of a particular file

jdub at us.ibm.com jdub at us.ibm.com
Thu Nov 18 15:44:51 EST 2004


On Thu, 2004-11-18 at 14:15, 419cf994 at tempmail.wgz.org wrote:
> I've been reading through the archives for several days, so I hope I 
> haven't missed an answer somewhere.
> 
> Is there a way to determine the actual flash space occupied by a 
> particular file on a JFFS2 partition?  'ls' and 'du' report number of 
> bytes of the content of the file, but of course compression and other 
> factors affect that greatly.
> 
> My definition of actual space is flexible...  could be number of blocks or 
> pages occupied, or something similar.  I just need a metric that's more 
> closely related to storage space than uncompressed size.

I don't know of a way to get this info on a running system.  If you can
pull the binary filesystem image off of the board you might be able to
hack jffs2dump.c in the util directory to give you that info.

Or maybe there are other ways that I don't know about.

josh






More information about the linux-mtd mailing list