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.
If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/
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.
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.
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:
Extracts yours bookmarks out of sqlite with the format:
This is the way to get access to your Firefox history...
For all users of https://addons.mozilla.org/de/firefox/addon/speed-dial/
This command will use grep to read the shortcut (which in the above examle is file.url), and filter out all but the only important line, which contains the website URL, and some extra characters that will need to be removes (for example, URL=http://example.com). The cut command is then used to get rid of the URL= at the beginning. The output is then piped into Firefox, which should interpret the it as a web URL to be opened. Of course, you can replace Firefox with any other broswer. Tested in bash and sh.
Support several arguments.
Usage: google "[search string]"
Example: google "something im searching for"
This will launch firefox and execute a google search in a new tab with the provided search string.
You must provide the path to your Firefox binary if using cygwin to $ff or create an alias like follows:
alias firefox='/cygdrive/c/Program Files (x86)/Mozilla Firefox/firefox.exe'
Most Linux flavors with Firefox installed will use just ff="firefox" and even OSX.
Found this useful query at http://id.motd.org/pivot/entry.php?id=22. The b.parent=2 in the command refers to the bookmarks folder to extract. See the source webpage for additional info.
Pros: Works in all Windows computers, most updated and compatible command.
Cons: 3 liner
Replace fcisolutions.com with your site name.
this will open a new tab in firefox for every line in a file
the sleep is removable but i found that if you have a large list of urls 50+, and no sleep, it will try to open all the urls at once and this will cause them all to load a lot slower, also depending on the ram of your system sleep gives you a chance to close the tabs before they overload your ram, removing & >2/dev/null will yield unpredictable results.
useful to use after with the --load-cookies option of wget
When you right click a text box in Firefox and you have installed a few dictionaries you'll see a loooong list of spellcheckers. Most of them are duplicated (symlinks). This command deletes de duplicates and reduces the list.
If you need to create a profile and are already running Firefox, you don't need to close it to do it. Also, if you don't know the exact name of the profile, this would allow you to pick from a list.
and creating several different profiles, use this command to run multiple Firefox profiles simultaneously.
with grep for em:name rather than name, you will get much better result.
1.) my profile ends with $USER not with .default
2.) only grep for the first occurrence because some extensions have the translated name also inside the install.rdf
Grab a list of MP3s (with full path) out of Firefox's cache
Ever gone to a site that has an MP3 embedded into a pesky flash player, but no download link? Well, this one-liner will yank the *full path* of those tunes straight out of FF's cache in a clean list.
Shorter and Intuitive version of the command submitted by (TuxOtaku)
Ever gone to a site that has an MP3 embedded into a pesky flash player, but no download link? Well, this one-liner will yank the names of those tunes straight out of FF's cache in a nice, easy to read list. What you do with them after that is *ahem* no concern of mine. ;)