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.
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:
Wow, didn't really expect you to read this far down. The latest iteration of the site is in open beta. It's a gentle open beta-- not in prime-time just yet. It's being hosted over at UpGuard (link) and you are more than welcome to give it a shot. Couple things:
# from xfce session to avoid keyboard shortcut clashing
# start xephyr in VGA1 monitor:
Xephyr -keybd ephyr,,,xkbmodel=evdev,xkblayout=it -listen tcp -ac -reset -output VGA1 :5
# then start an xterm locally
# and remote ssh (no X fw needed if local tcp with access disablesd (-tcp -ac) => UNSECURE!!!
xrdb -merge ~/.Xresources
xterm -geometry 132x50-0+0
# start awesome
dbus-launch $(which awesome)
dex -a -e Awesome
The multiplication table for math study
Return IP information about your external ip address with JSON format
This command line detect ldap hosts, by mandatory dns entry, then ping them to detect response average. based on ping response average it sorts and print the faster server in first output line
For machines that have many ip blocks spanning different Class C's, this will show which ones.
Runs "php -i", filter the error_log location, then watches it using "tail"
Change Seville for your prefered city.
Using "", which allow bash commands to be interpreted by sed scripts, I've embedded a sed script in another sed substitution, in case, the 4th line of the file at the end of the second one.
"Sample output" shows a minimalistic configuration file.
This prevents access to old CGI code
FQPN - Path = Filename
For subsequent commands in the prefixed path:
PYTHONPATH=$PWD/lib/python*/site-packages ./bin/pip --version
https://xkcd.com/936/ introduced us to what actually is a good password. Here's such an implementation.
Credit: quinq on #suckless
This will print a random emoji within the range of 1F600 - 1F64F, which includes all the face emoji.
Obviously, this will only show something meaningful if your terminal can display emoji, but it may be useful in scripts.
This likely requires recent versions of bash
This takes a picture (with the web cam) every 5 minutes, and send the picture to your e-mail.
Some systems support
mail -a "References: "
so that all video surveillance emails are grouped in a single email thread.
To keep your inbox clean, it is still possible to filter and move to trash video surveillance emails (and restore these emails only if you really get robbed!)
Will open strace on all apache process, on systems using sbin/apache (debian) or sbin/httpd (redhat), and will follow threads newly created.
When bundle install sucks ...This runs isuckat_ruby.rb and when stderror matches find gem ' it will gem install what ever is missing ...
N: On the current line, sed will display it on pattern space, plus a \n (new line); but
s/\n//: Will get rid of new line displayed on pattern space, joining the current line's end with the start of the next line
Useful in scripts.
sort -R randomize the list.
head -n1 takes the first.
Access a random news web page on the internet.
The Links browser can of course be replaced by Firefox or any modern graphical web browser.
Replaces the first instance of 'foo' with 'bar'. To replace all instances of 'foo' with 'bar': !!:gs/foo/bar/
Uses ImageMagick and potrace to vectorize the input image, with parameters optimized for xkcd-like pictures.
(In French) Connection aux hotspots FreeWifi, et maintien de la connection active