Using grep to search for hex strings in a file

This seems to work for me: LANG=C grep –only-matching –byte-offset –binary –text –perl-regexp “<\x-hex pattern>” <file> short form: LANG=C grep -obUaP “<\x-hex pattern>” <file> Example: LANG=C grep -obUaP “\x01\x02” /bin/grep Output (cygwin binary): 153: <\x01\x02> 33210: <\x01\x02> 53453: <\x01\x02> So you can grep this again to extract offsets. But don’t forget to use binary mode … Read more

dd: How to calculate optimal blocksize? [closed]

The optimal block size depends on various factors, including the operating system (and its version), and the various hardware buses and disks involved. Several Unix-like systems (including Linux and at least some flavors of BSD) define the st_blksize member in the struct stat that gives what the kernel thinks is the optimal block size: #include … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)