Skip to content

Instantly share code, notes, and snippets.

@lindeskar
Last active June 17, 2024 00:38
Show Gist options
  • Save lindeskar/347fd5da63b91a109d382500adc70960 to your computer and use it in GitHub Desktop.
Save lindeskar/347fd5da63b91a109d382500adc70960 to your computer and use it in GitHub Desktop.
macOS 10.13 Safari browser history with timestamp
sqlite3 $HOME/Library/Safari/History.db "select datetime(visit_time + 978307200, 'unixepoch', 'localtime') as date, title from history_visits order by visit_time asc"
@2nevergiveup
Copy link

Hi @ @lindeskar,
Sorry for the stupid question, where do I run your code to see the time stamp for the safari browser?
Thanks in advance!

@AgnieszkaUcinska
Copy link

Yeah. Works. Thanks a lot :D

@amsimoes
Copy link

Works well but doesn't show url unfortunately. Url is in another table I think

@rogerluan
Copy link

Might be useful for someone: you can view the history visually in a GUI like https://sqlitebrowser.org/dl/
It's the same file in the command line: /Users/your_user_name/Library/Safari/History.db

Hope this helps someone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment