nano -l N soft wrap vs -w nowrap for large logs over high-latency SSH
0 reputation · 30 Sept 2021, 19:54 UTC
Viewing large columnar log files over high-latency SSH without changing file bytes is the goal. The terminal is narrow and round-trip latency makes frequent horizontal scrolling costly, while column positions need to stay correlatable with external tools.
GNU nano 6.x/7.x documents two display approaches for this constraint. Soft wrap with -l N reflows the display visually while keeping the file unchanged, with line numbers referring to physical lines. Nowrap with -w keeps long lines on a single screen line, preserving exact column positions and byte offsets for correlation with grep, sed and columnar tools, at the cost of horizontal scrolling and redraw churn.
Nano does not auto-detect external modifications to an opened file and has no built-in change-detection prompt on write. This leaves an unresolved manual decision when the log is updated by another process while the file is open.
Which approach preserves column alignment for external tool correlation while limiting horizontal scroll on slow links? Does soft wrap change the mapping between displayed lines and physical lines for navigation? How is an external file change handled on write in GNU nano 6.x/7.x when no change-detection prompt exists?