An Alias to List Recently Changed Files

Looking for a recently changed file? Not sure of the name? Trying to do this in a directory with lots of files? Try the lr alias:

alias lr "ls -lagFqt \!* | head"

The alias takes advantage of the -t option () to ls, so that recent files can float to the top of the listing. head () shows just the first ten lines.

A simple lr in my home directory gives me:

bermuda:home/dansmith :-) lr total 1616 -rw------- 1 dansmith staff 445092 Oct 7 20:11 .mush256 -rw-r--r-- 1 dansmith staff 1762 Oct 7 20:11 .history drwxr-xr-x 30 dansmith staff 1024 Oct 7 12:59 text/ -rw------- 1 dansmith staff 201389 Oct 7 12:42 .record drwxr-xr-x 31 dansmith staff 1024 Oct 4 09:41 src/ -rw-r--r-- 1 dansmith staff 4284 Oct 4 09:02 .mushrc ...

You can also give a wildcarded pattern, in order to narrow the search. For example, here's the command to show me the dot files that have changed lately:

.??* 
bermuda:home/dansmith :-) lr .??* -rw------- 1 dansmith staff 445092 Oct 7 20:11 .mush256 -rw-r--r-- 1 dansmith staff 1762 Oct 7 20:11 .history -rw------- 1 dansmith staff 201389 Oct 7 12:42 .record -rw-r--r-- 1 dansmith staff 4284 Oct 4 09:02 .mushrc ...

- DS