Except you need tail, because ls -t lists the files from newest to oldest.
And beware of filenames with embedded newlines, they will get cut in half by the tail and you might end up manipulating a file other than the one you wanted.
Makeshifts last the longest.
In reply to Re^2: Finding Oldest File in a Directory
by Aristotle
in thread Finding Oldest File in a Directory
by awohld
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |