Skip to content

Latest commit

 

History

History
44 lines (38 loc) · 1.8 KB

README.md

File metadata and controls

44 lines (38 loc) · 1.8 KB

most-visited-websites

How to get a list of the most visited websites when using Mozilla Firefox

Code

  • Open the browsing history in Mozilla Firefox by pressing Ctrl + Shift + H
  • Select the full history of Mozilla Firefox by pressing Ctrl + A, copy it with Ctrl + C and paste it to a .txt file, e.g. my_history.txt, with Ctrl + V
  • Make sure to get the full history, not just the past 7 days or so
  • Use one of the following commands on a GNU/Linux system:
cat my_history.txt | cut -d'/' -f3 | sort | uniq -cd | sort -nr > ./ranked-websites-no-protocol.txt
# Returns the domain names without their protocol
# Example:
# https://en.wikipedia.org/wiki/Linux
# is returned as
# en.wikipedia.org
cat my_history.txt | cut -d'/' -f1,2,3 | sort | uniq -cd | sort -nr > ./ranked-websites-with-protocol.txt
# Returns the domain names with their protocol
# Example:
# https://en.wikipedia.org/wiki/Linux
# is returned as
# https://en.wikipedia.org
cat my_history.txt | cut -d'/' -f3 | grep -ive "www\." | grep -e "\..*\." | sort | uniq -cd | sort -nr
# Returns the domain names (without their protocol) that have a subdomain and this subdomain is not "www."
# Example:
# https://www.wikipedia.org
# is not returned because its subdomain is "www."
# https://en.wikipedia.org/wiki/Linux
# is returned as "en.wikipedia.org" because its subdomain is "en."

Links