Looking for a command that will return the single most recent file in a directory.
Not seeing a limit parameter to ls...
ls
With only Bash builtins, closely following BashFAQ/003:
shopt -s nullglob for f in * .*; do [[ -d $f ]] && continue [[ $f -nt $latest ]] && latest=$f done printf '%s\n' "$latest"