Hide

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again.

Delete that bloated snippets file you've been using and share your personal repository with the world. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.


Get involved!

You can sign-in using OpenID credentials, or register a traditional username and password.

First-time OpenID users will be automatically assigned a username which can be changed after signing in.

UpGuard checks and validates configurations for every major OS, network device, and cloud provider.
Hide

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for:

Hide

News

May 19, 2015 - A Look At The New Commandlinefu
I've put together a short writeup on what kind of newness you can expect from the next iteration of clfu. Check it out here.
March 2, 2015 - New Management
I'm Jon, I'll be maintaining and improving clfu. Thanks to David for building such a great resource!
Hide

Top Tags

Hide

Functions

extract all urls from firefox sessionstore

Terminal - 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" > session_urls.txt
2009-06-14 15:08:31
User: birnam
Functions: awk grep sed
2
extract all urls from firefox sessionstore

This will extract all of the urls from a firefox session (including urls in a tab's history). The sessionstore.js file is in ~/.mozilla/firefox/{firefox profile}

Alternatives

There are 5 alternatives - vote for the best!

Terminal - Alternatives
grep -oP '"url":"\K[^"]+' $(ls -t ~/.mozilla/firefox/*/sessionstore.js | sed q)
2009-12-09 20:34:32
User: sputnick
Functions: grep ls sed
0

Require "grep -P" ( pcre ).

If you don't have grep -P, use that :

grep -Eo '"url":"[^"]+' $(ls -t ~/.mozilla/firefox/*/sessionstore.js | sed q) | cut -d'"' -f4
perl -lne 'print for /url":"\K[^"]+/g' $(ls -t ~/.mozilla/firefox/*/sessionstore.js | sed q)
2009-12-14 00:51:54
User: sputnick
Functions: ls perl sed
0

If you want all the URLs from all the sessions, you can use :

perl -lne 'print for /url":"\K[^"]+/g' ~/.mozilla/firefox/*/sessionstore.js

Thanks to tybalt89 ( idea of the "for" statement ).

For perl purists, there's JSON and File::Slurp modules, buts that's not installed by default.

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

Know a better way?

If you can do better, submit your command here.

What others think

Or, from anywhere in user's workspace:

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

Comment by plasticdoc 443 weeks and 1 day ago

Good update plasticdoc -- but be aware that this will pull urls from every sessionstore you have - so if you run multiple profiles of firefox like I do, this will return urls from all of them. This might be what you want, maybe not.

Comment by birnam 443 weeks and 1 day ago

Around whatever http://www.huaracherunpas-cher.fr/nike-air-huarache-homme_150.html we http://www.huaracherunpas-cher.fr/nike-huarache-noir-et-bleu_130.html conduct, either in the office or simply http://www.huaracherunpas-cher.fr/nike-air-huarache-90_110.html performing harmful http://www.huaracherunpas-cher.fr/air-huarache-homme_67.html duties in your house http://www.huaracherunpas-cher.fr/huarache-chaussure_122.html , we start http://www.huaracherunpas-cher.fr/nike-huarache-leopard_57.html to use the http://www.huaracherunpas-cher.fr/nike-air-huarache-pas-chere_161.html ideal running shoe to defend each http://www.huaracherunpas-cher.fr/huarache-free-run_145.html of our toes. Adult http://www.huaracherunpas-cher.fr/air-max-huarache_39.html men employed in http://www.huaracherunpas-cher.fr/huarache-nike-blanche_127.html the construction web page http://www.huaracherunpas-cher.fr/nike-air-huarache-run-chaussures_174.html considerably need to http://www.huaracherunpas-cher.fr/air-huarache-paris_138.html have http://www.huaracherunpas-cher.fr/chaussure-huarache-nike_173.html on the perfect boots and http://www.huaracherunpas-cher.fr/nike-huarache-beige_91.html shoes for http://www.huaracherunpas-cher.fr/nike-air-huarache-run-pas-cher_98.html basic safety since items http://www.huaracherunpas-cher.fr/nike-huarache-free-light_134.html might tumble anytime. Acquiring injured http://www.huaracherunpas-cher.fr/nike-air-huarache-light-ultramarine_64.html is not a choice http://www.huaracherunpas-cher.fr/nike-air-huarache-og-retro_101.html simply because http://www.huaracherunpas-cher.fr/nike-huarache-magenta_51.html it can readily conclusion your http://www.huaracherunpas-cher.fr/huarrache-blanche_135.html own expensive employment. http://www.huaracherunpas-cher.fr/huarache-enfant_62.html We have to are http://www.huaracherunpas-cher.fr/nike-huarache-run-pas-cher_61.html aware of http://www.huaracherunpas-cher.fr/nike-air-huarache-2_92.html the ideal sneaker http://www.huaracherunpas-cher.fr/nike-air-force-huarache_124.html to use according to your http://www.huaracherunpas-cher.fr/boutique-nike-huarache_151.html help comfort http://www.huaracherunpas-cher.fr/huarache-light_50.html and also safety. Material Glowing blue http://www.huaracherunpas-cher.fr/huarache-chaussures_95.html running shoe can http://www.huaracherunpas-cher.fr/nike-huarache-noir-et-rose_58.html supply you with many http://www.huaracherunpas-cher.fr/free-huarache_103.html benefits if http://www.huaracherunpas-cher.fr/huarache-bleu_111.html you work with dangerous internet http://www.huaracherunpas-cher.fr/nike-huarache-toute-noir_154.html http://www.huaracherunpas-cher.fr/nike-huarache-run_72.html sites. These are also http://www.huaracherunpas-cher.fr/nike-air-huarache-bleu_167.html good if you find yourself http://www.huaracherunpas-cher.fr/nike-air-huarache-og_162.html inside muddy as well as http://www.huaracherunpas-cher.fr/nike-huarache-ultramarine_125.html rugged spots. Dressed http://www.huaracherunpas-cher.fr/nike-huarache-usa_114.html in ones silicone http://www.huaracherunpas-cher.fr/nike-huarache-homme_141.html shoes or boots http://www.huaracherunpas-cher.fr/nike-air-huarache-noir_97.html are unable http://www.huaracherunpas-cher.fr/nike-huarache-prix_66.html to hold up against http://www.huaracherunpas-cher.fr/huarache-nike-pas-cher_79.html the tough employment make. The boot http://www.huaracherunpas-cher.fr/nike-air-flight-huarache-og_48.html consists of tough http://www.huaracherunpas-cher.fr/huarache-instagram_169.html elements which don't http://www.huaracherunpas-cher.fr/nike-huarache-id_164.html easily be http://www.huaracherunpas-cher.fr/nike-huarache-1991_55.html destroyed since you perform your task. http://www.huaracherunpas-cher.fr/nike-air-huarache-turquoise_160.html You'll have relief http://www.huaracherunpas-cher.fr/huarache-4_118.html and also self-belief http://www.huaracherunpas-cher.fr/nike-air-huarache-run_43.html that you will http://www.huaracherunpas-cher.fr/huarache-acheter_83.html never hurt the feet. http://www.huaracherunpas-cher.fr/acheter-huarache_84.html You http://www.huaracherunpas-cher.fr/nike-huarache-fille_148.html will be able to http://www.huaracherunpas-cher.fr/nike-huarache-2_166.html square firmly for a slick terrain http://www.huaracherunpas-cher.fr/nike-air-max-huarache-hybrid_121.html without http://www.huaracherunpas-cher.fr/nike-air-huarache-international_104.html having sliding because the lone can http://www.huaracherunpas-cher.fr/nike-huarache-femme-pas-cher_140.html take firmly in http://www.huaracherunpas-cher.fr/chaussures-air-huarache_128.html the http://www.huaracherunpas-cher.fr/huarache-run_132.html grass as a consequence of side, http://www.huaracherunpas-cher.fr/nike-air-huarache-1991_65.html assisting you to http://www.huaracherunpas-cher.fr/nike-air-huarache-original_144.html target plus carry out http://www.huaracherunpas-cher.fr/nike-huarache_93.html your career http://www.huaracherunpas-cher.fr/air-huarache-noir_116.html effectively. In case people http://www.huaracherunpas-cher.fr/air-huarache-light_139.html get soaked, http://www.huaracherunpas-cher.fr/air-nike-huarache_107.html this type of water won't ravage http://www.huaracherunpas-cher.fr/nike-huarache-blanc_85.html the information http://www.huaracherunpas-cher.fr/huarache-beige_106.html presented in this http://www.huaracherunpas-cher.fr/huarache-femmes_170.html boot. It may possibly save you http://www.huaracherunpas-cher.fr/air-huarache-grise_142.html from power shock http://www.huaracherunpas-cher.fr/huarache-air-max_163.html likewise just in http://www.huaracherunpas-cher.fr/nike-huarache-jd_46.html case you by chance http://www.huaracherunpas-cher.fr/huarache-nike-noir_149.html get on http://www.huaracherunpas-cher.fr/air-huarache-solde_40.html a wide open cord. http://www.huaracherunpas-cher.fr/chaussure-air-huarache_180.html The protection it http://www.huaracherunpas-cher.fr/air-huarache-noire_117.html gives will save your health http://www.huaracherunpas-cher.fr/nike-air-huarache-retro_70.html as well http://www.huaracherunpas-cher.fr/nike-huarache-boutique_147.html as means that http://www.huaracherunpas-cher.fr/huarache-2017_99.html you can keep on your career. http://www.huaracherunpas-cher.fr/nike-air-huarache-rouge_47.html It http://www.huaracherunpas-cher.fr/air-huarache-og_71.html can also guarantee http://www.huaracherunpas-cher.fr/nike-air-huarache-safari_73.html relaxation to the ankles and http://www.huaracherunpas-cher.fr/nike-air-huarache-light_168.html toes and http://www.huaracherunpas-cher.fr/nike-air-huarache-light-pas-cher_44.html fingers even with your hard duties. http://www.huaracherunpas-cher.fr/nike-huarache-light-ultramarine_171.html It may http://www.huaracherunpas-cher.fr/basket-nike-huarache_45.html maintain your ft http://www.huaracherunpas-cher.fr/air-huarache-run_157.html risk-free throughout the winter weather along http://www.huaracherunpas-cher.fr/nike-huarache-light-og_115.html with under http://www.huaracherunpas-cher.fr/nike-air-force-1-huarache_113.html the scourging http://www.huaracherunpas-cher.fr/basket-huarache_63.html heating of the sun. http://www.huaracherunpas-cher.fr/nike-huarache-2013_159.html If you think cozy http://www.huaracherunpas-cher.fr/air-flight-huarache_68.html while using the http://www.huaracherunpas-cher.fr/huarache-vintage_42.html boot you happen to be donning, http://www.huaracherunpas-cher.fr/ you http://www.huaracherunpas-cher.fr/huarache-noir_86.html will not ever http://www.huaracherunpas-cher.fr/nike-air-huarache-solde_181.html sense fatigued easily. It will eventually http://www.huaracherunpas-cher.fr/nike-air-huarache-blanc_41.html permit you to be http://www.huaracherunpas-cher.fr/nike-huarache-chaussures_129.html more effective at http://www.huaracherunpas-cher.fr/nike-huarache-solde_94.html your workplace which has http://www.huaracherunpas-cher.fr/nike-air-huarache-prix_120.html a http://www.huaracherunpas-cher.fr/huarache-noir-et-blanc_96.html very clear thoughts in http://www.huaracherunpas-cher.fr/huarache-5_74.html addition to superior http://www.huaracherunpas-cher.fr/nouvelle-nike-huarache_82.html emotion. A running http://www.huaracherunpas-cher.fr/nike-huarache-taille_49.html shoe is made for http://www.huaracherunpas-cher.fr/nike-huarache-pour-femme_155.html tricky work opportunities http://www.huaracherunpas-cher.fr/huarache-montante_179.html around. The company has fantasized the needs http://www.huaracherunpas-cher.fr/huarache-light-og_105.html and wants http://www.huaracherunpas-cher.fr/nike-air-huarache-light-ultramarine-og_75.html of the person http://www.huaracherunpas-cher.fr/nike-air-huarache-taille_172.html which will put them on http://www.huaracherunpas-cher.fr/nike-huarache-rouge_81.html and http://www.huaracherunpas-cher.fr/nikeair-huarache_88.html that's why; they provided a sneaker http://www.huaracherunpas-cher.fr/nike-huarache-agassi_133.html desired and made http://www.huaracherunpas-cher.fr/nike-air-huarache-chaussures_80.html for this sort of http://www.huaracherunpas-cher.fr/nike-air-flight-huarache_102.html dangerous duties. Sensible workers http://www.huaracherunpas-cher.fr/air-huarache-femme_90.html will truly http://www.huaracherunpas-cher.fr/nike-id-huarache_158.html go for http://www.huaracherunpas-cher.fr/nike-huarache-free-run-pas-cher_156.html this kind of creation whenever they http://www.huaracherunpas-cher.fr/huarache-leopard_77.html really want http://www.huaracherunpas-cher.fr/nike-huarache-premium_126.html great safety. http://www.huaracherunpas-cher.fr/nike-air-huarache-beige_112.html Aside from your proper sneaker, it is http://www.huaracherunpas-cher.fr/achat-nike-huarache_137.html usually suitable to http://www.huaracherunpas-cher.fr/chaussures-huarache-nike_152.html use proper costume in http://www.huaracherunpas-cher.fr/huarache-og_183.html http://www.huaracherunpas-cher.fr/air-huarache-blanc_123.html the work. Some find it tricky http://www.huaracherunpas-cher.fr/nike-huarache-femmes_182.html to glimpse http://www.huaracherunpas-cher.fr/huarache-usa_100.html through shops and outlets but http://www.huaracherunpas-cher.fr/huarache-noir-femme_60.html you will come across http://www.huaracherunpas-cher.fr/huarache-nike-chaussures_131.html unique variations of workwear http://www.huaracherunpas-cher.fr/nike-huarache-3_108.html on line. http://www.huaracherunpas-cher.fr/nike-huarache-marron_165.html You will be able http://www.huaracherunpas-cher.fr/air-huarache-nike_87.html to realize a wide http://www.huaracherunpas-cher.fr/nike-air-zoom-huarache_89.html selection of http://www.huaracherunpas-cher.fr/nike-huarache-violet_54.html what you are http://www.huaracherunpas-cher.fr/nike-air-huarache-blanche_153.html hunting for the reason that http://www.huaracherunpas-cher.fr/nike-air-huarache-mid_78.html world wide web http://www.huaracherunpas-cher.fr/nike-huarache-free-run-2012_146.html can display you different http://www.huaracherunpas-cher.fr/nike-huarache-gris_59.html stores everywhere. http://www.huaracherunpas-cher.fr/huarache-og-2017_143.html You will see out there sizing's http://www.huaracherunpas-cher.fr/huarache-bordeaux_53.html , materials and http://www.huaracherunpas-cher.fr/nike-huarache-safari_52.html styles that may http://www.huaracherunpas-cher.fr/chaussure-nike-air-huarache_76.html fit tastes. Additionally, you http://www.huaracherunpas-cher.fr/nike-huarache-paris_69.html will avail great http://www.huaracherunpas-cher.fr/huarache-noir-et-rose_109.html deals considering that products http://www.huaracherunpas-cher.fr/chaussures-huarache_56.html on earth Broad Internet are usually less expensive than issues within shopping malls along with your local community suppliers.

Comment by scott154 14 weeks ago

Your point of view

You must be signed in to comment.