saga revisited

A tool ppl might find useful, saga.

All it does is creates directories in a way so they will always sort in chronological order.

http://songseed.org/exhibit/20120101/saga

Example:

$ saga python pattern socket client
/home/cturner/saga/20121124.myhostname.myusername.ac.python.pattern.socket.client
$

The ac is for uniqueness. Next would be ad.

If you want to reference the most recently created dir, type “saga -z”. e.g.

$ cd `saga -z`
$ tar xvf ~/Downloads/latest.tar

If you want to get the list of entries,

$ saga | grep python | tail -n 4
/home/cturner/saga/20121116.memlab.cturner.aa.python.doc.socket.programming.howto
/home/cturner/saga/20121116.memlab.cturner.ab.work.out.how.to.deal.with.longs.in.python
/home/cturner/saga/20121116.memlab.cturner.af.python.pattern.access.a.shared.lib.from.ctypes
/home/cturner/saga/20121122.memlab.cturner.aa.python.pattern.client.socket.echo
$

Rsync + ssh keys for backup. It’s easy to prune.

In the old days I had a home directory full of stress that stuff would get lost in. Now my home directory looks like this:

$ ls -lF
total 20
drwxrwxr-x  2 cturner cturner 4096 Nov 23 20:00 bin/
drwxrwxr-x  2 cturner cturner 4096 Nov 23 20:02 l/
drwxrwxr-x  243 cturner cturner 4096 Nov 23 19:50 saga/
$

The l (for link) directory allows you to link into stuff that you use regularly, like your JAVA_HOME or a particular project you want to fast-link to.

$ ls -lF $HOME/l
total 8
lrwxrwxrwx 1 cturner cturner 56 Nov 10 18:40 doc -> /home/cturner/saga/20110410.black.cturner.aa.doc
lrwxrwxrwx 1 cturner cturner 56 Nov 23 20:02 java -> /home/cturner/opt/20121123.memlab.cturner.ad.jdk1.6.0_37
lrwxrwxrwx 1 cturner cturner 56 Nov 10 18:40 rgrd -> /home/cturner/saga/20110818.black.cturner.ad.roguelike.patterns
$