in reply to Re: Finding Oldest File in a Directory
in thread Finding Oldest File in a Directory

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.

  • Comment on Re^2: Finding Oldest File in a Directory