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:
but you can't see the colors in that sample output :(
Nice command to create a list, you can create too with for command, but this is so faster.
You can get one specific line during any procedure. Very interesting to be used when you know what line you want.
I've corrected the function. My octal conversion formula was completely wrong. Thanks to pgas at http://mywiki.wooledge.org/BashFAQ/071 for setting me straight. The new function is from pgas and is very fast.
Run this on a windows machine then add your localhost as a socks server for port 8080 within your web browser. Your traffic will now be proxying and sent via your server over ssh.
For example, if you are the type who type ls very often, then
will ls after every command you issue.
It gzip each file in a directory separately
Another way of doing it that's a bit clearer. I'm a fan of readable code.
Works also with SML/NJ and other interpreters or tools with interactive environments.
Place the regular expression you want to validate between the forward slashes in the eval block.
Place this in your .bash_profile and you can use it two different ways. If you issue 'h' on its own, then it acts like the history command. If you issue:
Then it will display all the history with the word 'cd'
on multihomed hosts, connected to several networks, could be usefull to know the source address (local ip address) used to reach the target host, this command does not require root priviledges.
The command use a TCP socket, if there is any error the command return an empty string, elsewhere return a valid ip address.
Joker wants an email if the Brand X server is down. Set a cron job for every 5 mins with this line and he gets an email when/if a ping takes longer than 3 seconds.
Perfect time for the rarely used sub shell.
Usefull e.g. in krusader open terminal function
In this simple example the command will add a comma to the end of every line except the last. I found this really useful when programatically constructing sql scripts. See sample output for example.
Get full url via untr.im
plays with bash arrays. instead of storing the list of files in a temp file, this stores the list in ram, retrieves the last element in the array (the last html file), then removes it.