Bruce Momjian <pgman@candle.pha.pa.us> writes:
> In the first case, x2 is current, having be just switched to from x1,
> while in the second case, x1 is current. In BSD, you can use ls -ltT to
> see the seconds, but in Linux it is something different, and I am sure
> there are some operating systems that don't allow you to see the seconds
> at all. What general command-line solution can we propose for this
> process?
For a command-line solution it's probably sufficient to sort by mtime,
ie
ls -t | head -1
You'll be at worst 1 second behind reality, assuming 1-second
granularity of mtime (and assuming ls sorts by the real mtime not what
it shows you, but that's true everywhere AFAIK).
regards, tom lane