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] edible-llama.livejournal.com 2006-08-31 08:35 pm (UTC)(link)
Huh??? Computer language...don't...understand! @_@ I understood "llama" though. ^_^;

[identity profile] nyankoframe.livejournal.com 2006-08-31 09:27 pm (UTC)(link)
Of course you can understand llama. :P

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] relsqui.livejournal.com 2006-08-31 10:32 pm (UTC)(link)
That's HIGHLY silly. [livejournal.com profile] testing4l thinks you were, when you ran that command, editing a file that had "llama" in it three hundred times. >_>

[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)

[identity profile] testing4l.livejournal.com 2006-09-01 12:27 pm (UTC)(link)
BTW, you could've just done sudo grep -c llama /dev/mem. 8)

and again, that's the *substring* llama, not necessarily llama. 8)

[identity profile] nyankoframe.livejournal.com 2006-09-01 01:02 pm (UTC)(link)
So noted. :P I didn't think of that syntax, though.

Off-topic, your display picture is cute. <3

[identity profile] testing4l.livejournal.com 2006-09-01 10:04 pm (UTC)(link)
To be fair, I didn't think of it until I started typing it.

That's Meg when she was a bit younger. Surely you've seen our giant collection of pictures of the two of them?