Gregory Paciga

Gregory Paciga

Scientist by training, Tester by trade
Ph.D., Astronomy & Astrophysics

Email: gregory [at] paciga.com

tglob - chronological globbing for a linux shell

tglob is a python script that acts like an asterisk in a linux shell, except it sorts the files chronologically.

For example, the command

 mplayer * 
plays all the files in the current directory to mplayer in alphabetical order, but, assuming tglob is in your path, the command
 tglob mplayer 
plays all the files in the current directory in chronological order, and
 tglob -d ~/Music -n 10 -r mplayer 
plays the 10 oldest files in the directory ~/Music.

Features

Installing

Just download tglob.py and put it in your path.

I like renaming it to just "tglob" (without the .py) but that's just my preference.

Make sure it is executable, or else you will have to call it with python, e.g. "python /path/to/tglob.py mplayer" or something like that.

Download

The source file is here: tglob.py

Changes