Re: [Hampshire] grep -50 foo /dev/sda1 runs out of memory

2011-02-14 Thread Victor Churchill
Just thought I should close this off. Turned out there was a file left over from the edit session, buried in my .mozilla/whatever directory. Must have missed it when doing the 'find' command due to all the /proc and /dev entries. Didn't get anyy result with Hugo's 'tr' approach, though I may have

Re: [Hampshire] grep -50 foo /dev/sda1 runs out of memory

2011-02-11 Thread Bob Dunlop
On Thu, Feb 10 at 10:22, Victor Churchill wrote: ... I believe 'grep -number' will give number lines of context around the match. Like 'grep -A 100 -B 100. grep -number is not portable -A -B is. Unless you are putting it in a script whatever works for you is fine. Anyway rather than the tr

[Hampshire] grep -50 foo /dev/sda1 runs out of memory

2011-02-10 Thread Victor Churchill
Hi, I have a firm recollection of reading war stories in the past about how the above incantation will find textual information on the disk that you have mislaid (the information, that is, not the disk). So I had exited an editor session attached to my GMail through the It's All Text! Firefox

Re: [Hampshire] grep -50 foo /dev/sda1 runs out of memory

2011-02-10 Thread Hugo Mills
On Thu, Feb 10, 2011 at 07:20:41PM +, Victor Churchill wrote: So I recalled this grep trick.Unfortunately it chugs for a while then exits with an error: victor@pan2:~$ sudo grep -100 Vishal /dev/sda1 grep: /dev/sda1: Cannot allocate memory I /thought/ grep would work through a file of