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:
(In French) Connection aux hotspots FreeWifi, et maintien de la connection active
Will append lines to the hosts file to do some basic ad blocking.
Neither of the others worked for me. This does.
The router Technicolor TC7200 has an exploit where the file http://192.168.0.1/goform/system/GatewaySettings.bin is open for unauthenticated access. Even though it is binary, the 2 last strings are the username and password for the pages for router management. It can be read using the 'strings' command, 'hexdump -C' or a hexadecimal editor.
(default user/password = admin/admin)
Reveals more configuration, including SSID name and Key for the wifi network:
wget -q -O - http://192.168.0.1/goform/system/GatewaySettings.bin
Hexadecimal dump of the file:
wget -q -O - http://192.168.0.1/goform/system/GatewaySettings.bin | hexdump -C
This will download and install the latest version of the open store on the ubuntu phone, this store includes unconfined applications such as the TweakGeek and the Ubuntu Touch Tweak Tool. You can see the install instructions from here: https://open.uappexplorer.com/docs#install
Returns the current price of a troy ounce of gold, in USD. Requires the "jq" JSON parser.
Downloads Bluetack's level 1 IP blocklist in .p2p format, suitable for various Bittorrent clients.
Returns the global weighted BTC rate in EUR. Requires the "jq" JSON parser.
Here?s the idea: Submit a one-liner that returns a value or string usable for monitoring something. The more interesting/important, the better.
Tag your one-liners with CLFUContest to enter. Whether you?re participating or not, be sure to vote on the other submissions. The top 5 contest entries by vote count will receive a $10 Amazon gift certificate. On top of that, we?ll select our 3 favorite entries to receive $25 Amazon gift certificates. The prizes might even overlap! Feel free to enter as many times as you like. Check out the URL above for the fine print.
Sweep and download all mp3 (in French) of "Rendez-vous avec X" (Meet with M. X) of French public radio
Balaye et telecharge les episodes depuis 1997
Let's give Flatcap credit for this elegant solution, instead of leaving it hidden as a comment.
Tested on RHEL6 and it works. Nice and clean.
Use this command to execute the contents of http://www.example.com/automation/remotescript.sh in the local environment. The parameters are optional.
Alterrnatives to wget:
curl -s http://www.example.com/automation/remotescript.sh | bash /dev/stdin param1 param2
w3m -dump http://www.example.com/automation/remotescript.sh | bash /dev/stdin [param1] [param2]
lynx -source http://www.example.com/automation/remotescript.sh | bash /dev/stdin [param1] [param2]
Easiest way to get the external IP address.
If the version already downloaded. it will not download again
No need to parse html page, website gives us a txt file :)
Improved google text-to-speech function. Allows to specify language, plays sound in terminal. Automatically removes downloaded file after successfully processing.
say LANGUAGE TEXT
say en "This is a test."
say pl "To jest test"
Downloads this raw script https://github.com/git/git/blob/master/contrib/completion/git-completion.bash from Github, copies it to your home directory, autoloads it in ~/.bashrc and sources it.
Change *.ext to the appropriate extension
Just pulls a quote for each day and displays it in a notification bubble...
or you can change it a bit and just have it run in the terminal
wget -q -O "quote" https://www.goodreads.com/quotes_of_the_day;echo "Quote of the Day";cat quote | grep '“\|/author/show' | sed -e 's/<[a-zA-Z\/][^>]*>//g' | sed 's/“//g' | sed 's/”//g'; rm -f quote