how to change the day output from 2 days to lets say 50 days 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
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.