Tag Archives: bash

Play or open newest file from the linux command line

In some cases it is convenient to have a shortcut to open the newest file in a directory. Maybe the last show your dvr recorded, or the last file you bought from amazon.

For these cases I found this little bash snippet useful:

ls -tr | tail -n 1 | xargs -I FILE kde-open "FILE"
Posted in Computers | Tagged , | 2 Comments