3 ms·
It does. tail will get SIGPIPE and exit. https://stackoverflow.com/q/8369506 https://stackoverflow.com/q/8369506 But tail might read up to pipe buffer size mor
by Self-Perfection 4y ago
It does. tail will get SIGPIPE and exit. https://stackoverflow.com/q/8369506 https://stackoverflow.com/q/8369506
But tail might read up to pipe buffer size more data than is actually required. Also tail + head approach have an overhead of copying data between processes.
- sigil 4y agoThat’s why tail | head isn’t a reliable way to seek an fd — it will seek past the desired offset by reading and then failing to write up to PIPEBUF bytes.