grep

Elan Ruusamäe glen at delfi.ee
Tue Feb 22 19:06:09 CET 2005


On Tuesday 22 February 2005 18:58, wrobell wrote:
> On Tue, Feb 22, 2005 at 06:23:51PM +0200, Elan Ruusamäe wrote:
> > On Tuesday 22 February 2005 17:08, wrobell wrote:
> > > $ grep -ri page $HOME > log
> > >
> > > will create huge log file
> >
> > pretty obvious.
> >
> > chdir out of $HOME, so you won't be grepping recursively output file
>
> yep... but it is going to work non-recursively when set of input files is
> small (output file is not written to disk yet), otherwise it will hog my
> hd. and it is not deterministic, so it is not a feature but bug, imho.
most likely this is because grep uses stdio output buffering (it's usually 
4k), and so if the result is below that 4k, the data is not yet written to 
disk (output file)


-- 
glen




More information about the pld-devel-en mailing list