Display live logs
This page was last updated on July 18, 2009.
Display live logs in a terminal window
- Type this command in a terminal window, replacing /PATH/TO/LOG/FILE with the path to the file you’d like to display:
- Example:
- To display multiple files in one window, you can add more file names with a space between each:
- Example:
- To stop displaying the live log(s), press the Ctrl and c keys at the same time.
tail -f /PATH/TO/LOG/FILE
tail -f /home/littlegirl/.xsession-errors
tail -f /PATH/TO/LOG/FILE1 /PATH/TO/LOG/FILE2 /PATH/TO/LOG/FILE3
tail -f /home/littlegirl/.xsession-errors /var/log/syslog /var/log/Xorg.0.log
Display a live log in an Xterm window
- Type this command in a terminal window, replacing /PATH/TO/LOG/FILE with the path to the file you’d like to display:
- Example:
- Explanation of the command:
- -geom is the size and placement of the window.
- 135 tells -geom the width of the window. Change this to whatever number you prefer.
- 25 tells -geom the height of the window. Change this to whatever number you prefer.
- 10 tells -geom how far from the left edge of the monitor the window is placed. Change this to whatever number you prefer.
- 100 tells -geom how far from the top edge of the monitor the window is placed. Change this to whatever number you prefer.
- -e tells Xterm to execute a program (in this case it’s running the tail program).
- To stop displaying the live log(s), close the Xterm window.
xterm -geom 135x25+10+100 -e 'tail -f /PATH/TO/LOG/FILE'
Now you can close the terminal window and the Xterm window will stay open, displaying the live log.
xterm -geom 135x25+10+100 -e 'tail -f /home/littlegirl/.xsession-errors'
Display a live log in a custom colored Xterm window
This is a variation of the Xterm command above, using -bg and -fg to define custom background and foreground colors. When defining colors by name (like pink or green or red, etc.), no special treatment is required. When defining colors by hex codes, the hex code must be surrounded by single quotes (example: '#FF00FF').
- Type this command in a terminal window, replacing BACKGROUNDCOLOR with the color you’d like as the background, replacing FOREGROUNDCOLOR with the color you’d like the text to be, and replacing /PATH/TO/LOG/FILE with the path to the file you’d like to display:
- Example with a midnight blue background (
-bg midnightblue) and sky blue text (-fg skyblue): - Example with a hot pink background (
-bg '#FF00FF') and pastel pink text (-fg '#FFC0CB'): - To stop displaying the live log(s), close the Xterm window.
xterm -bg BACKGROUNDCOLOR -fg FOREGROUNDCOLOR -geom 135x25+10+100 -e 'tail -f /PATH/TO/LOG/FILE'
Now you can close the terminal window and the Xterm window will stay open, displaying the live log.
xterm -bg midnightblue -fg skyblue -geom 135x25+10+100 -e 'tail -f /home/littlegirl/.xsession-errors'
xterm -bg '#FF00FF' -fg '#FFC0CB' -geom 135x25+10+100 -e 'tail -f /home/littlegirl/.xsession-errors'
MultiTail
- See also: MultiTail.
Obligatory Happy Ending
And they all lived happily ever after. The end.

Comment: