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:
Use 'ctrl-@' to set a mark. See the first comment for a better explanation.
Super fast way to ftp/telnet/netcat/ssh/ping your loopback address for testing. The default route 0.0.0.0 is simply reduced to 0.
This command disable sending of start/stop characters.
It's useful when you want to use incremental reverse history search forward shortcut (Ctrl+s).
To enable again, type:
This command shows the various shortcuts that can be use in bash, including Ctrl+L, Ctrl+R, etc...
You can translate "\C-y" to Ctrl+y, for example.
useful signals are:
pkill -SIGSTOP mpg321 #pause
pkill -SIGCONT mpg321 #resume
pkill -SIGHUP mpg321 #stop
pkill -SIGKILL mpg321 #force exit
TIP: use aliases or shortcuts to control mpg321 from the Desktop Manager
This will copy a file from your current directory to the same location on another machine. Handy for configuring ha, copying your resolv.conf, .bashrc, anything in /usr/local, etc.
This should work with different locales. Another post reports
When you have to manage lot of servers, it's boring to type ssh root@myhost for each connection. Now you can type juste "s someting" and you are connected.
You can too add bash_completion script to complet with tab the name of your servers. This will be the next tips from me ;)
After a command is run in bash, !$ is set to the last (space-delimited) argument of the command. Great for running several commands against the same file in a row.