linux - How can I calculate a block number of where a word is located on disk? -


i want find out block number word "word" using. know blocks start @ 0, thought adding 2114+1 answer, it's not...

user@host:~$ strings -td dump.dd|grep "word" 2114 __strtsuper word stored here 

i know -td brings me offset in decimal, how can calculate block number? need 2114 number?

strings offsets in bytes. disk block composed group of bits, commonly 512 (and on bigger disks 4096).

so, must know block size of disk, convert bytes (1 byte = 8 bits), , divide strings offset number.


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -