简体   繁体   中英

how to find the no of data block in a partition?

A disk.img of 100mb using dd been created,then i've made three partions using fdisk 1.boot(vfat)40mb, 2.root(squashfs)40mb, 3.dummypartition(20mb). now i have to calculate the number of data blocks in the squashfs ie: root partition, for setting up the dm-verity. so how to calculate it.

Use the "debugfs" tool to view file info on the command line terminal

# debugfs /dev/<partition>
# stat /path/to/file

Or

# debugfs -R "stat /path/to/file" /dev/<partition>

For example:

  # debugfs -R "stat /etc/group"  /dev/sda3
    

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM