The tail command in Linux
Ok, so I'm not really a *nix guy. I just happen to know a few handful commands in Linux. I kind of wonder why some people get angry when you ask them something about what they know about Linux. I remember talking to a friend of mine and I asked him how I should organize my files in Linux. He answered,
f*ck, just arrange it anyway you like
I don't know if that's suppose to be a joke or something... The question was came from a Linux newbie and I think that wasn't the correct response. It's not nice to be stingee about that things you know... So I'm sharing something I learned from my work today while using putty. :)
Ok, how do you list the last 100 lines in a textfile in Linux?
using the command
tail -n 100 mytext.txt
lists the last 100 lines from mytext.txt. Before, I used to do
cat mytext.txt to list the content of a log file, and it gets really annoying especially if you're browsing through a file with a huge file size.
This makes life very convenient indeed...