tail -f

Follow a log file in real time

tail -f keeps the file open and prints new lines as they are written. Press Ctrl+C to stop. Add | grep PATTERN to filter in real time. The most-used command during active incidents.

Example

$ tail -f /var/log/app/api.log
(continues live... Ctrl+C to stop)
Tip: Type it yourself in the terminal below - reading is not the same as doing.