Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

Read Chrome and Firefox history from command line

Chrome

Shamelessly ripped from How do I access Chrome's history (saved browsing history) file as a readable format without using third-party applications or extensions? - Quora You will need a sqlite3 binary, probably from the package sqlite , to read the Chrome history file. Chrome history in Linux is normally stored as file ~/.config/google-chrome/Default/History.

sqlite3 ~/.config/google-chrome/Default/History "select datetime(last_visit_time/1000000-11644473600,'unixepoch'),url from  urls order by last_visit_time asc" > output.txt

Firefox, Palemoon, Waterfox

This one's in UTC. Find the relevant history sqlite file. For palemoon, it is similar to:

~/".moonchild productions/pale moon/1234abdf.default/places.sqlite"


sqlite3 ~/".moonchild productions/pale moon/1234abdf.default/places.sqlite" "select datetime(h.visit_date/1000000,'unixepoch'),p.url from moz_historyvisits as h, moz_places as p where p.id == h.place_id order by h.visit_date asc;"

Comments