Shows a single line per interface (device), with its IPv4 settings. Shorter command, better readability in output. Show Sample Output
Gets the internal and external IP addresses of all your interfaces, or the ones given as arguments Show Sample Output
grabs your local IP Address. Show Sample Output
This command toggles the touchpad on and off, when it's on, the right side scroll strip (annoying) and the tap-clicking are disabled, you can change this by changing occurances of 2 in the command to 0. this whole command can then be given a keyboard shortcut so that the touchpad is disableable without using a special fn key (which linux doesn't recognize on some computers) or a seperate button.
file displays a files type the -L flag means follow sym-links (as libraries are often sym-linked to another this behavior is likely preferred) more complex behavior (*two* grep commands!) could be used to determine if the file is or is not a shared library.
gets the last number of the mac address to use it for other stuff Show Sample Output
This will get the mac address of the eth0 and change lowercase to uppercase. The sed command removed the colons.
Get windows version with servicepack and hostname Show Sample Output
We can put this inside a function:
fxray() { curl -s http://urlxray.com/display.php?url="$1" | grep -o '<title>.*</title>' | sed 's/<title>.*--> \(.*\)<\/title>/\1/g'; };
fxray http://tinyurl.com/demo-xray
Show Sample Output
short enough to be tweetable Show Sample Output
most usefull when creating batch scripts using several usb drives and some commands like mkntfs needs a device name the -w option for grep is here to filter lines when you have multiple drives with the same volume label. Without this option, the grep command will return /media/KINGSTON /media/KINGSTON_ /media/KINGSTON__ Show Sample Output
Download a bunch of random animated gifs from http://gifbin.com/
This will show the locations, in order of preference, that MySQL will look for a configuration file Show Sample Output
Useful after a complete system update (without a new kernel) when you want to know, which processes need to be restarted Show Sample Output
Original submitter's command spawns a "grep" process for every file found. Mine spawns one grep with a long list of all matching files to search in. Learn xargs, everyone! It's a very powerful and always available tool.
* ps -ef # list running processes * grep string * pull the process names from 8th field * cut and delimiter '/' * print 4th field * get rid of trailing grep * for loop killall -9 $i which is the process name Show Sample Output
commandlinefu.com is the place to record those command-line gems that you return to again and again. 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.
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.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
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: