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

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -