[clug] Command of the Hour
Peter Barker
pbarker at barker.dropbear.id.au
Tue Sep 16 03:13:34 GMT 2008
On Tue, 16 Sep 2008, Ian wrote:
> Ok, I want to start a bit of a discussion here - I want everyone to
> chime in and tell the list of any random, obscure and useful commands
I've thought for many years I should be working more logging into my
workflows. I decided to spend the few minutes to actually do it a while
back.
----
pbarker at milligan:~$ log "Cleaned up log command a little"
200809161159 - Cleaned up log command a little
pbarker at milligan:~$ log "Added a single comment to log command"
200809161200 - Added a single comment to log command
pbarker at milligan:~$ tail -2 ~/notes/log
200809161159 - Cleaned up log command a little
200809161200 - Added a single comment to log command
pbarker at milligan:~$ log "Noted that the almond tree needs pruning" garden
Section 'garden' (file /nethome/pbarker/notes/logs/garden) does not exist
pbarker at milligan:~$ touch /nethome/pbarker/notes/logs/garden
pbarker at milligan:~$ log "Noted that the almond tree needs pruning" garden
200809161201 - Noted that the almond tree needs pruning
pbarker at milligan:~$ cat /nethome/pbarker/notes/logs/garden
200809161201 - Noted that the almond tree needs pruning
---
There must be several similar commands out there, but *finding* one is the
trick. Writing one seemed easier (and, of course, the NIH syndrome).
begin-base64 644 log
IyEvYmluL3NoCgpCQVNFRElSPSQoL2Jpbi9scyAtZCB+cGJhcmtlci9ub3Rl
cykKCmZ1bmN0aW9uIHVzYWdlKCkgewogICAgZWNobyAiVXNhZ2U6IGxvZyBj
b21tZW50IFtzZWN0aW9uXSIKICAgIGV4aXQ7Cn0KCk1FU1NBR0U9JDEKU0VD
VElPTj0kMgoKaWYgWyAteiAiJE1FU1NBR0UiIF07IHRoZW4KICB1c2FnZQpm
aQoKTE9HRklMRT0iJEJBU0VESVIvbG9nIgppZiBbICEgLXogIiRTRUNUSU9O
IiBdOyB0aGVuCiBMT0dGSUxFPSIkQkFTRURJUi9sb2dzLyRTRUNUSU9OIgog
aWYgWyAhIC1lICIkTE9HRklMRSIgXTsgdGhlbgogICAgIGVjaG8gIlNlY3Rp
b24gJyRTRUNUSU9OJyAoZmlsZSAkTE9HRklMRSkgZG9lcyBub3QgZXhpc3Qi
CiAgICAgZXhpdDsKIGZpCmZpCgpEQVRFPWBkYXRlICcrJVklbSVkJUglTSdg
ClNUUklORz0iJERBVEUgLSAkTUVTU0FHRSIKCmVjaG8gIiRTVFJJTkciCmVj
aG8gJFNUUklORyA+PiRMT0dGSUxFCg==
====
Another gem I came across recently was "stress"; loads a machine's
disks/cpu/memory/IO. I used it to load a machine so I could check its
power-consumption-under-load.
Yours,
--
Peter Barker | Programmer,Sysadmin,Geek.
pbarker at barker.dropbear.id.au | You need a bigger hammer.
:: It's a hack! Expect underscores! - Nigel Williams
More information about the linux
mailing list