commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
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.
"That's it. Not much to see here. The first command writes any cache data that hasn't been written to the disk out to the disk. The second command tells the kernel to drop what's cached. Not much to it. This invalidates the write cache as well as the read cache, which is why we have the sync command first. Supposedly, it is possible to have some cached write data never make it to disk, so use it with caution, and NEVER do it on a production server. You could ... but why take the risk?
As long as you are running a post 2.6.16 kernel,..."
If you have a directory with lot of backups (full backups I mean), when it gets to some size, you could want to empty some space. With this command you'll remove half of the files. The command assumes that your backup files starts with YYYYMMDD or that they go some alphabetical order.
Add `-maxdepth 1` to find to exclude subfolders.
This command will replace all instances of 'foo' with 'bar' in all files in the current working directory and any sub-directories.
Additionally it may give your geolocation if it's known by hostip.info
alternative using 'host'