1

I just wonder where the temp data is stored during pipes. For example, ls -alh | grep sth If the ls command would generate a lot information, say bigger than 10G (of cause impossible in reality), where would this information be placed?

mkb2000
  • 117
  • 1
  • 1
  • 8
  • I'm not sure it is - the OS might block output in the ls process until grep is ready to read it, although there'll be a small (4K?) buffer in the C library at each end depending on which calls they're using. But I'm guessing. – Rup May 23 '13 at 15:21
  • 2
    @Rup: I don't know about the size, but conceptually you are correct. The data is stored in a kernel buffer, and `write` call made by `ls` will simply block when the buffer is full. – Gabe May 23 '13 at 15:22

0 Answers0