0

I read this: See website visit time in Safari history

In this article, there is something like this

 sqlite3 ~/Library/Safari/History.db 'select visit_time,title from history_visits order by visit_time desc;' \
     | while read i; do d="${i%%.*}"; echo "$(date -r $((d+978307200))) | ${i#*|}"; done \
     | head -n 30

My question: how could I extend this script from 2 days to 50 days thanks for answering

3
  • thanks I only see "normal Windows" in terminal. is it possible to show the adresses from "private windows" ? (normal window: I don't know if this is a correct word)
    – renitent
    Jan 21 '20 at 16:48
  • Please don't post comments as answers :-)
    – nohillside
    Jan 21 '20 at 16:59
  • The idea of private mode is to leave as few traces as possible. This means that pages visited in private mode won't show up in the history.
    – nohillside
    Jan 21 '20 at 17:00
1

There is nothing in the one-liner which limits by days. If you want to see all visited pages, remove the trailing \ | head -n 30 (which currently cuts off the output after 30 lines).

If you still don't see more than two days, check the history settings in Safari.

3
  • thanks if I do this like you mentioned ''' sqlite3 ~/Library/Safari/History.db 'select visit_time,title from history_visits order by visit_time desc;' \ > | while read i; do d="${i%%.*}"; echo "$(date -r $((d+978307200))) | ${i#*|}"; done \ > ''' there is no difference in terminal output
    – renitent
    Jan 21 '20 at 15:52
  • @renitent The query can't show more lines than there are in the history :-)
    – nohillside
    Jan 21 '20 at 15:54
  • thanks I only see "normal Windows". is it possible to show the adresses from "private windows" ? (normal window: I don't know if this is a correct word)
    – renitent
    Jan 21 '20 at 16:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .