Date: Sat, 13 Jul 2002 12:53:21 -0700 From: Luigi Rizzo <rizzo@icir.org> To: hackers@freebsd.org Subject: how to find offset of a string in a binary file ? Message-ID: <20020713125320.A67829@iguana.icir.org>
next in thread | raw e-mail | index | archive | help
So, does anyone know how to use the basic unix tools to find the offset of a string in a binary file ? Specifically, I would like to locate the offset of the string "MFS Filesystem goes here" into a kernel compiled with with MD_ROOT option. grep does not help because it gives the offset of the "line" which contains the string (where a "line" begins righr after a newline). Any ideas ? thanks luigi -----------------------------------+------------------------------------- Luigi RIZZO, luigi@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL/FAX: +39-050-568.533/522 . via Diotisalvi 2, 56126 PISA (Italy) Mobile +39-347-0373137 -----------------------------------+------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020713125320.A67829>