Which Linux commands are useful for reading a large log file and watching new lines appear?
Answer
Use `less` for interactive reading without loading the entire file into an editor, `head` or `tail` for a limited number of lines, and `tail -f` to follow appended lines. For systemd-managed services, `journalctl -u <service>` is often more appropriate than assuming the service writes a plain text file.
Strong answer includes
- less for interactive large-file inspection
- tail -f follows appended lines
- journalctl is relevant for systemd service logs
Practical example
While reproducing an API failure on a Linux host, run `tail -f /var/log/app/app.log` in one terminal and the test in another. If the app is managed by systemd, use `journalctl -u app.service -f` instead.