tail
Text ProcessingDisplay the last lines of a file
Options & Flags
Available options for this command
-n NUMPrint last NUM lines (default 10)
-fFollow file, showing new lines as they are added
-FFollow file, retry if file is renamed or deleted
Examples
Common usage examples
Display last 10 lines
tail file.txtDisplay last 50 lines
tail -n 50 file.txtFollow log file in real-time
tail -f /var/log/syslogNotes
- tail -f is essential for monitoring log files
- Press Ctrl+C to stop following