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
eliminates "l" and "o" characters change length by changing 'x' here: cut -c 1-x Show Sample Output
short enough to be tweetable Show Sample Output
This backup function preserve the file suffix allowing zsh suffix aliases and desktop default actions to work with the backup file too. 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
* 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
I alias this as "tach": alias tach='screen -x `screen -ls | grep Detached | cut -c -10`' If you have several detached sessions it will just grab the first one. If you're running nested screens you can open new outer windows and run tach repeatedly to grab all the detached sessions into that one. Show Sample Output
3 is the column's number.
Matrix Screen HPUX
Most systems (at least my macbook) have system users defined, such as _www and using "users" for example will not list them. This command allows you to see who the 'virtual' users are on your system. Show Sample Output
This is a safest variation for "sitepass function" that includes a SALT over a long loop for sha512sum hash Show Sample Output
netstat has two lines of headers: Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Foreign Address State Added a filter in the awk command to remove them
Get the first IPv4 address of an interface Show Sample Output
One liner is based on this article: https://www.computerhope.com/issues/ch001307.htm Show Sample Output
This command will grep the entire directory looking for any files containing the list of files. This is useful for cleaning out your project of old static files that are no longer in use. Also ignores .svn directories for accurate counts. Replace 'static/images/' with the directory containing the files you want to search for. 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: