Dotfiles, utilities, and other apparatus.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

15 lines
292 B

#!/bin/sh
# if we got a directory as first param, cd there first:
if [ -d "$1" ]; then
cd "$1"
fi
# probably GNU-dependent
# list (A)lmost all files in
# current dir, sorted by (t)ime,
# and return the first (newest):
basename=`ls -At | head -1`
# get full path:
readlink -f "$basename"