This line alone will cat every file that the user has permission to read.
for item in $(find /* -name "*"); do cat $item; done
Now we add another loop inside of this mechanism along with a grep and some other things to find what we want.
for item in $(find /* -name "*")
do
for filtered in `cat $item | grep x`
do
echo "Filename: "; echo $item; echo ""; echo "Data:"; echo $filtered; echo ""; echo ""
done
done
Change the parameters of grep inside the second 'for' loop to modify the search.
This script takes forever to run depending on the performance of your system. It also makes your terminal program shit its pants when you run it. It's just for fun, and I was thinking you could use `hexdump -C | grep x` to find certain patterns of bytes in any given file.