Wednesday, April 8, 2015

What I learned today! tail -f vs. less +F

I know, it's been a while. Truth is, after MakerSquare, things got busy.

In fact, things are still busy, what with the new (or newish) job.

But that's why I'm back: because things are going so fast that I want to start recording at least one useful thing I learned.

(Otherwise, as one developer noted today, it's real easy to look back at your old code and not know what's going on.)



So today I learned about less +F.

At work, I use tail -f to follow a file as it changes. So, if I'm running a Unicorn server that has a log file and I want to see what's happening in that log, I tail -f unicorn.log.

But now, according to this post, I can use the similar less +F, which both follows the file and allows one to look through the file as normal with a Ctrl-C.

I also learned that you can tail -f multiple files.