how to grab most recent directory
I'm working on a shell script, and I'm trying to find a way to grab the most recently-created directory name.
Visually, from the shell, it is the last item in: ls -lsrt
But I've googled for 2 hours now to find a way to do it programmatically... so if the script gods can show a little mercy... I'd be grateful.
Thanks,
TC
|