This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to see used size of /dev/mtdx (NAND driver)

hello, 2GB NAND connected with DM365 and i have total 5 partition mtd0 to mtd5.

cat /proc/mtd 
dev:      size            erasesize    name
mtd0: 00780000  00040000   "bootloader"
mtd1: 00080000  00040000   "params"
mtd2: 00400000  00040000   "kernel"
mtd3: 20000000  00040000   "filesystem1"
mtd4: 5f400000   00040000   "filesystem2"
mtd5: 00002000  00000010   "spi_eeprom"

can any one tell me how to see occupied space and remaining space of this partition?