We’re rewarding the question askers & reputations are being recalculated! Read more.
2 edited tags; edited tags
| link
1
source | link

Is it possible to reference the most recently modified file in a command line argument?

I frequently download PDF files with heinous numeric file names from my browser. These automatically go into ~/Downloads. Ideally I would like to just be able to open these files with:

evince "the most recently modified file"

without having to open ~/Downloads to find the file name.

Is there a simple way to specify "the most recently modified file" in bash?

NOTE: I know that it is possible to do this, but ideally I am looking for a solution that would be simpler than ls -t'ing ~/Downloads to check the name.