The every day things from Thalamus' life.

Thalamus' Blog

27 September, 2010

Script – log your session

Filed under: ComputerStuff_en — Thalamus @ 12:37

A co-worker uses ‘script’ to log his activities. Smart, in many situations – especially if you need to go back and check … what the hell did I just do 🙂

script -q -a -f script-output/session-`date +%d.%m.%Y-%H%M`.log

He has this line in his ‘.bash_profile’ … only requirement is that the folder ‘script-output’ exists in beforehand.

• • •
 

22 September, 2010

Tar archive via unix pipe and find.

Filed under: ComputerStuff_en — Thalamus @ 03:16

Was asked to make a tar archive from a selection of filetypes. Ended up with this string.

find Top_dir/Sub_dir -type f \( -name \*\.tif -o -name \*\.xml -o -name \*\.jpg \) | xargs tar -uf Archive.tar
• • •
 

16 September, 2010

VIM – and matching parenthesis highlighting

Filed under: ComputerStuff_en — Thalamus @ 01:22

I just hate the default syntax highlighting of vim – so, I headed over to google today and after some frustration, from not finding the stuff I was looking for. I finally found this useful post.

So, now I run this guys suggested #3 – adding this line to my $HOME/.vimrc file.

:hi MatchParen cterm=none ctermbg=none ctermfg=white
• • •
 

15 September, 2010

SNMPD – too much logging ?

Filed under: ComputerStuff_en — Thalamus @ 08:13

I run CentOS 5.5 on my server – and I needed to turn off some of the logging from the snmpd … – logging who is connecting and from where.
So I edited /etc/sysconfig/snmpd.options

OPTIONS="-LS 5 d -p /var/run/snmpd.pid -a"

And restarted the daemon.

• • •