Showing History of Visits in Mozilla Firefox

If one needs to know when some website has been visited in Mozilla Firefox then go to the default directory and open the places.sqlite file:

cd ~/.mozilla/firefox/<xyz>.default/
sqlite3 places.sqlite

Issue below SQL command

select visit_date,
       datetime(visit_date/1000000, 'unixepoch','localtime') as S
from moz_historyvisits
where place_id in
       (select id from moz_places where url like 'https://www.google.come%')
and S like '2019-01-2%'
order by S;

References:

  1. How do I decode the Last_Date_ Visited field in the places.sqlite db?
  2. SQLite: Date And Time Functions
  3. Entity relationship diagram of tables: The Places database

ER diagram looks like this:
ER diagram

Advertisements