3 ms·
> Did running a ‘cat’ really take more time in '95 than fiddling around the ‘<file’? It does now for a sufficiently large file. And it's even more extreme whe
by dllthomas 6y ago
> Did running a ‘cat’ really take more time in '95 than fiddling around the ‘<file’?
It does now for a sufficiently large file. And it's even more extreme when the recipient can do things with a file that it can't do with a pipe.
Which isn't to say it's worth bitching about the rest of the time.
Edited to add a silly example:
$ time cat /dev/zero | tail -c +5000000000 | head -c 10 | xxd
00000000: 0000 0000 0000 0000 0000 ..........
real 0m2.808s
user 0m0.348s
sys 0m4.849s
$ time </dev/zero tail -c +5000000000 | head -c 10 | xxd
00000000: 0000 0000 0000 0000 0000 ..........
real 0m0.006s
user 0m0.008s
sys 0m0.004s
- paulryanrogers 6y agoYeah big files need all kinds of fun special attention like ripgrep or zgrep