The Apple menu "Recent Items" entry is handy, but at times I would like to be able to access it via command line, e.g. to change to a directory I was just working in with a GUI app. Is there a way to get access to at least the last open file or folder from Desktop to terminal?
Failing that, is there a way to access a smart folder from the command line (for example, if I have one that consists of files modified in the past 2 days).