Skip to main content

Module tail

Module tail 

Source

Structs§

TailConfig
Configuration for tail

Enums§

FollowMode
Follow mode
TailMode
Mode for tail operation

Functions§

follow_file
Follow a file for new data (basic implementation)
open_file_noatime
Public wrapper for the binary fast path to open files with O_NOATIME.
parse_size
Parse a numeric argument with optional suffix, same as head
sendfile_tail_bytes
Use sendfile for zero-copy byte output on Linux (last N bytes). Falls back to read+write if sendfile fails (e.g., stdout is a terminal).
tail_bytes
Output last N bytes from data
tail_bytes_from
Output from byte N onward (1-indexed)
tail_file
Process a single file/stdin for tail.
tail_file_bytes_direct
Ultra-fast direct tail -c N for a single file. Bypasses BufWriter entirely.
tail_file_direct
Ultra-fast direct tail -n N for a single file. Bypasses BufWriter entirely. For small files, reads into a stack buffer and uses memrchr to find the last N lines, then writes via raw write(2). For larger files, uses the seek+sendfile path with automatic terminal fallback.
tail_lines
Output last N lines from data using backward SIMD scanning
tail_lines_from
Output from line N onward (1-indexed)