Subscribe to How-To Geek

Recommended: Click Here to Run a Free Scan for Common PC Errors   [Sponsored Link]

A "live" view of a logfile on Linux

This approach works for any linux operating system, including Ubuntu, and is probably most often used in conjunction with web development work.

tail -f /path/thefile.log

This will give you a scrolling view of the logfile. As new lines are added to the end, they will show up in your console screen.

For Ruby on Rails, for instance, you can view the development logfile by running the command from your project directory:

tail -f log/development.log

As with all linux apps, Ctrl+C will stop it.

The Geek is the founder of How-To Geek and a geek enthusiast. When he's not coming up with great how-to articles, he's probably writing at his personal blog. This article was written on 09/11/06 and tagged with: Ubuntu, SysAdmin, Programming, Ruby on Rails, Ruby

Comments (2)

  1. sven

    if your're already in less and would like to trace the file:
    less /path/thefile.log
    Shift+F

    to stop_
    Ctrl+C
    q

  2. moe

    I've seen all of the tips you got for linux and dude it's cool so i got something to help some new ubuntu users
    1.www.getdeb.net
    getdeb got some really cool programs all it takes is for you to find something you like and click download because it's .deb file it's easy to install, but what shuld you get,
    A.(Ubuntu Tweak) with this little easy to use you can do most of the things here on you're website,
    for new ubuntu users who don't know how to use the terminal and the config editor by useing ubuntu tweak you can add and remove things off the desk top like My Computer- Trash and alot more
    B.(Screenlets) even that screenlets come in ubuntu the version is older the one on getdeb is the latest it's aloes is with all of there programs.
    C.( Avant Window Navigator) this nice thing here is a dock that apple can never beat, just like screenlets the version is old and by ading getdeb to you're source list you can get applets that beat all of the other docks .
    2.(Flock) is an amazing web browser it's just like firefox but you can do mutch more and it's so easy to use. (i'm using it right now)
    3.(Alien Arena) i cant give a tip with no games that's just wrong, alien arena is a cool 3d game it's amazing
    4. if you're to lazy to install of the things on getdeb.net here is a away to bring getdeb to you're home for the next 500 years
    open your source list (system-administration-software source)
    a windows well open and but your password if it asked you for when the windows opens click on
    third-party software, on the bottom left corner click on +Add and add this source to it
    deb http://ubuntu.org.ua/ getdeb/
    now just click close and it will ask you to reload then open up the terminal in (Applications-accessories-terminal and type or past this
    sudo apt-get update && sudo apt-get upgrade
    now everything on getdeb.net that works on you're ubuntu will be in synaptic package manger.


Leave a Comment




Leave your friendly comment here. If you have a computer help question, leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Copyright © 2006-2008 HowToGeek.com. All Rights Reserved.