ls -l # gives you a long listing
ls -lt # gives you a long listing sorted by modified time, newest first
ls -ltr # gives you a long listing sorted by modified time, oldest first
Remove the "l" (ell) for short output. Add -1 (one) to get a single column.
Pipe to head -1 or tail -1 as necessary
ls -t1 | head -1
gives you the newest file.
|