Show the last 50 lines of a log.
tail -n 50 app.logShow the last lines of a file. Use -f to follow new lines as they arrive.
tail [OPTION]... [FILE]...Show the last 50 lines of a log.
tail -n 50 app.logFollow a log through rotation or replacement.
tail -F /var/log/app.log| Option / clause | Description |
|---|---|
-n, --lines=NUM | Print the last NUM lines (default 10). |
-c, --bytes=NUM | Print the last NUM bytes. |
-f, --follow | Keep reading as the file grows. |
-F | Follow by name and retry if the file is replaced or recreated. |
-q, --quiet | Never print file headers. |
-v, --verbose | Always print file headers. |
Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.