Nov 16
Found: Unix/Linux Gold
I stumbled upon this invaluable gem:
http://souptonuts.sourceforge.net/how_to_linux_and_open_source.htm
It is a page of over 200 tips and tricks for all sorts of *nix and opensource goodies, like this:
TIP 70:
Generating Random Numbers.
$ od -vAn -N4 -tu4 < /dev/urandom
3905158199
This guide is full of stuff that you may only do occasionally but you can never remember how to do it (like configuring Spamassassin (tip 92)). There’s also a lot of handy shell programming hacks, like this:
TIP 179:
history - bash command to get a history of all commands typed. But, here is a way
that you can get date and time listed as well.
$ HISTTIMEFORMAT="%y/%m/%d %T "
Defining the environment variable above give you the date/time info when you
execute history:
$ history
...
175 05/06/30 12:51:46 grep '141.162.' mout > mout2
176 05/06/30 12:51:48 e mout2
177 05/06/30 12:56:59 ls
178 05/06/30 12:57:02 ls
179 05/06/30 12:57:39 ls
180 05/06/30 12:57:49 ls -l
181 05/06/30 13:01:10 history
182 05/06/30 13:01:20 HISTTIMEFORMAT="%y/%m/%d %T "
183 05/06/30 13:01:23 history
...
Learn it! Live it! Love it!
Whatever.
No Comments
Leave a comment