#!/bin/sh # probably GNU-dependent # list (A)lmost all files in # current dir, sorted by (t)ime, # and return the first (newest): ls -At | head -1