Extract all urls from the last firefox sessionstore.js file used.

\"Effective
Image via Wikipedia

Some taken from commandlinefu. What all the below commands are doing is basically that the url: is captured from the sessionstore.js file and then just  extract the URL from the line. These are done in various ways using perl, sed and awk:

List last opened tabs in firefox browser

F=\”$HOME/.moz*/fire*/*/session*.js\” ; grep -Go \’entries:[[^]]*\’ $F | cut -d[ -f2 | while read A ; do echo $A | sed s/url:/n/g | tail -1 | cut -d\” -f2; done

extract all urls from firefox sessionstore

sed -e \”s/[{/n/g\” -e \”s/}, {/n/g\”¬† sessionstore.js | grep url | awk -F\”,\” \'{ print $1 }\’| sed -e \”s/url:\”([^\”]*)\”/1/g\” -e \”/^about:blank/d\”

Extract all urls from the last firefox sessionstore.js file used.

grep -oP \’\”url\”:\”K[^\”]+\’ $(ls -t ~/.mozilla/firefox/*/sessionstore.js | sed q)

Extract all urls from last firefox sessionstore used in a portable way.

perl -lne \’print for /url\”:\”K[^\”]+/g\’ $(ls -t ~/.mozilla/firefox/*/sessionstore.js | sed q)

Extract all urls from the last firefox sessionstore.js file used.

sed -e \’s/{\”url\”:/n&/g\’ ~/.mozilla/firefox/*/sessionstore.js | cut -d\” -f4

\"\"

\"Reblog

2 thoughts on “Extract all urls from the last firefox sessionstore.js file used.”

  1. [email protected] says:

    you are hideous