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 find to recursively make a list of all files from the current directory and downwards. The files have to have an extension of the ones listed. Then for every file found, grep it for 'searchString', returns the filename if searchString is found.
Essentially the same as funky's alias, but will not traverse filesystems and has nicer formatting.
There can be more than one trailing slash, all of them will be removed.
In 2014, ask a kind of specific UAC authorization to run due to his dangerousity.
To install on centos 6.2
for Centos auto accept:
yum install fortune* -y
yum install cowsay* -y
Removed the -f command as I dont know how, but it works without it.
Almost the same but one folder higher =).
This command will generate "CHECK TABLE `db_name.table_name` ;" statements for all tables present in databases on a MySQL server, which can be piped into the mysql command. (Can also be altered to perform OPTIMIZE and REPAIR functions.)
Tested on MySQL 4.x and 5.x systems in a Linux environment under bash.
XDMCP ust be enabled (gdm,lightdm,xdm etc )
In July 2008, there was an uproar over Foxconn motherboards feeding Linux installs incorrect ACPI information (http://ubuntu-virginia.ubuntuforums.org/showthread.php?t=869249).
Foxconn has gladly corrected their mistake, but make sure it's not happening on your motherboard!
After running the command, just view the 'dsdt.dsl' in any editor you like.
This command adds your pem key to SSH so that you no longer have to manually specify it when connecting to EC2 instances.
# you can do this:
# instead of this:
ssh -i ~/.ssh/KEY_PAIR_NAME.pem ec2-instance.amazonaws.com
This will create rapidly an html menu. You can paste it in you're html page with the middle button(the wheel). I didn't test it in an html with css, but it seems alright.
Uses xargs to call the second grep with the first grep's results as arguments
requires the package tofrodos on Debian/Ubuntu:
sudo apt-get install tofrodos
This uses curl to find out the access times of a web service
This command will replace all instances of 'foo' with 'bar' in all files in the current working directory.
You'll first need to install the uuid package. Available immediately from apt in Ubuntu, Debian, or other myriad Debian variants. You could always compile it from source as well.
sends notification msg within repeated intervals of time to notify-send ;)
Just for fun.