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