Wednesday, 11 March 2009

^ [char] commands in terminal

I have found the following control commands very useful in terminal and Firefox.

^x
^l
^h remove character
^a
^e
^u
^b
^f
^r

^p
^n

Saturday, 7 March 2009

Awk

1. md5sum *.java | awk '{print $1}' | sort | uniq -d

Hashes

1. md5sum *.java | uniq -d -w32

Diff commands

1. diff <(man uniq) <(man guniq)
2. vimdiff <(man uniq | col -b) <(man guniq | col -b)

Friday, 6 March 2009

Perl, Python and Tcl

Easy: Tcl (Tk toolkit)
Harder: Perl, Python

NB You need to install Tcl to Mac by MacPorts

Unix philosophy

Unix thinks everything as files, while Linux has gone further.
Linux sees some files also as pipes.

NB files can be processes, drivers and memory handling.

Commands to write manuals

1. $ pod2man // Mac. Docbook is similar

Unix Commads for a Novice

Commands which I love
1. $ cat t???
2. $ man -k / $ apropos // A similar command is whatis

NB whatis does not show the low-level commands

Commands about which I am not sure
1. $ talk person tty-name // I am not sure how you can use this in localhost


Less useful commands
1. $ chgrp others data
2. $ cdown user data