In nano, I created a simple text file named 'blue_pink_red_orange_green' with the following contents:red blue orange green pinkI then opened the file again and did:sudo strings /dev/mem | grep orangebut nothing was found. However, using sudo strings /dev/mem outputs a large amount of data.I'm not using any swap, so why can't I find my text file in my memory? Is it really in there somewhere? If so, how can I find it?
Why can't I see my file in RAM?
linux;memory
You might be running into trouble because /dev/mem has holes in it: memory locations that don't exist can't be read.strings is designed to read a regular file (or pipe or other input stream) from beginning to end and assumes there can't be holes in its input. It probably aborts the first time it gets a read error, which would correspond to the first hole in /dev/mem. That means it would never read anything beyond the first hole.