The Decider said on Sun Aug 12 09:58:18 +0000 2007 | permalink
Tagged: log rails less

less is more

Use less to view your logs.


 less log/development.log

What? it looks ugly? with weird escape characters and such…?

Try this:


 less -r log/development.log

Why? Well if you have a large log file then it could take a while to load it into an editor and ‘less’ is smarter than that… Search using normal vi commands: / and ?

Move around in the file using SPACE, j,k,l,; or the arrow keys. g gets you to the top of the file and G gets you to the bottom.

h is help and as always RTFM, man less