When I run the code "grep -rl 'my string' ./", I receive the output of file names that contain 'my string' in it. When I go to view that file using vi, it comes up as a lot of weird characters. I've tried viewing the code using hexdump and xdd also, and that just outputs it in 1s and 0s. How do I view the code that grep views? As in, how do I view the code with the readable code 'my string' in it? The file in this case is a .so file. Thank you

1

There are 1 best solutions below

1
Danny Staple On

What you want is the strings command - a unix command line tool that "looks for ASCII strings in a binary file".

If you run strings <your file name> it will show all the printables there.

Source: man strings