Hi Hugo, On 10 February 2011 20:19, Hugo Mills <h...@carfax.org.uk> wrote: > > Possibly it's because the disk has large expanses of data with no > LF characters in it. It's most likely to be zeroes or control > characters, so I'd suggest something like: > > sudo tr -d \\000-\\011\\013-\\037 </dev/sda1 | grep -100 Vishal > > It's not guaranteed to work, but you might get lucky. :)
Giving it a go... > > If you actually saved it, have you tried looking for that text in > extant files, rather than grepping the whole disk? Well I *thought* I had saved it ;-) I did try find / -mmin -60 but was deluged with unexpected stuff from the /proc and /dev file systems, and couldn't figure out how to use -prune so gave up on that. But I suspect the file might have been deleted by the Firefox plugin after I exited the editor. Hence trying a punt on grepping the disc. > > Also, note that you're only going to get one line of the output > with little or no indication of where in the disk it is, so you > _still_ won't have the data -- just one line of it and no idea of > where the rest is, so the above incantation probably isn't what you > need. (I'm too tired right now to think of what it is that you _do_ > need, though; sorry. Maybe someone else can help with that). > I believe 'grep -number' will give <number> lines of context around the match. Like 'grep -A 100 -B 100". -- best regards, Victor Churchill, Bournemouth -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --------------------------------------------------------------