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:
missed the last char thanks @Josay
Can change language and speed, see espeak man page for options. (Install espeak in your linux distro via yum or apt-get)
For insomniacs you may need to enclose in a while true; do ...; done loop ;)
use manpages, they give you "ultimate commands"
"ls -SshF --color" list by filesize (biggest at the top)
"ls -SshFr --color" list by filesize in reverse order (biggest at the bottom)
adding users to groups on OS X is not a straightforward process, you need to use the new in built in Directory Service command line utility...
Sorts a character string, using common shell commands.
using bc is for sissies. dc is much better :-D
Polish notation will rule the world...
For Mac OS X users only
This command uses nmap to perform reverse DNS lookups on a subnet. It produces a list of IP addresses with the corresponding PTR record for a given subnet. You can enter the subnet in CDIR notation (i.e. /24 for a Class C)). You could add "--dns-servers x.x.x.x" after the "-sL" if you need the lookups to be performed on a specific DNS server.
On some installations nmap needs sudo I believe. Also I hope awk is standard on most distros.
-l auto-selects many more digits (but you can round/truncate in your head, right) plus it loads a few math functions like sin().
Only one command and not dependant on full read access to the devices.
Show today date on a yearly calendar.
simple way to show free swap
see about php install configure
I find this format easier to read if your going through lots of files. This way you can open the file in any editor and easily review the file
Traces the system calls of a program. See http://linuxhelp.blogspot.com/2006/05/strace-very-powerful-troubleshooting.html for more information.
This command will print all fields from the given input to the end of each line, starting with the Nth field.
This has helped me numerous times trying to find either log files or tmp files that get created after execution of a command. And really eye opening as to how active a given process really is. Play around with -anewer, -cnewer & -newerXY
xargs can be used in this manner to download multiple files at a time, and xargs will in this case run 10 processes at a time and initiate a new one when the number running falls below 10.