FG
💻 Software

ls -rt (How to list just THE LAST file? e.g. for: | xargs gnome-open)

Fresh5 days ago
Mar 15, 202644362 views
Confidence Score0%
0%

Problem

e.g. directory containing jpeg files: how to easily open just the most recent jpeg in the current directory?

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: ls -rt (How to list just THE LAST file? e.g. for: | xargs gnome-open)

Low Risk

What you really want is first file of a non-reversed time-based list. The -r is for humans because we want the last thing on the screen that has scrolled by, rather than the first. In the case of the machine figuring it out, it might as well use and…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment