nyankoframe: (Default)
nyankoframe ([personal profile] nyankoframe) wrote2006-08-31 10:19 pm
Entry tags:

There are too many llamas on my laptop...

So much so that cat errored out too. :P


nyanko@LupinIX:~$ sudo cat /dev/mem | strings | grep llama | wc -l
cat: /dev/mem: Bad address
332


For those people who don't know what that means, here's an explanation:

"But to explain it very simply, what that command does is to dump the computer's memory to the screen (cat), get all the text from the dump(strings), find all lines which have llama in them (grep) and then count the number of lines (wc).

So there were 332 lines with "llama" in them in my laptop's memory. ^_^;"

[identity profile] nyankoframe.livejournal.com 2006-09-01 09:43 am (UTC)(link)
He should've read the description! Besides, I doubt you can edit /dev/mem that way. :P

[identity profile] testing4l.livejournal.com 2006-09-01 12:18 pm (UTC)(link)
/dev/mem displays the contents of memory -- including disk caches and editor memory. So, if you were vi-ing a file right then with "llama" in it 300 times, then you would have 300 llamas. 8)

Also worth noting, that only counts the substring llama, so for example, the Spanish verb "llamar" would match. 8)