List Safari History on OS X Oneliner

The problem

The history list in Safari is not timestamped. Yes, it is chronologically ordered but for some misterious reason is not timestamped. That sucks but fortunately there is a simple solution for that.

The history is actually saved as files on your machine.

So ….

Solution

is pretty simple:

cd ~/Library/Caches/Metadata/Safari/History && ls -lt | perl -MURI::Escape -lne 'print uri_unescape($_)' | less

or you can define a nice csh alias using function

function safari-history() {
    cd ~/Library/Caches/Metadata/Safari/History
    ls -lt | perl -MURI::Escape -lne 'print uri_unescape($_)' | less
}