grep's -c outputs how may matches there are for a given file as "file:N", cut takes the N's and awk does the sum. Show Sample Output
This will allow you to mount a CD-ROM on Solaris SPARC 9 or lower. This will not work on Solaris 10 due to void and the volume management daemons. www.fir3net.com
Searches /var/log/secure for smtp connections then lists these by number of connections made and hosts.
Useful to check DDoS attacks on servers. Show Sample Output
I've got this posted in one of my .bash_profiles for humor whenever I log in. Show Sample Output
For quick validation of folder's file-contents (structure not taken into account) - I use it mostly to check if two folders' contents are the same. Show Sample Output
This is the simple revision number on stdout, that can be fed to any useful/fun script of yours. Setting LC_ALL is useful if you use another locale, in which case "Revision" is translated and cannot be found. I use this with doxygen to insert my source files revisions into the doc. An example in Doxyfile: FILE_VERSION_FILTER = "function svn_filter { LC_ALL=C svn info $1 | grep Revision | awk '{print $2}'; }; svn_filter" Share your ideas about what to do with the revision number ! Show Sample Output
The description of how the one-liner works is here at my blog: http://jugad2.blogspot.com/2008/09/unix-one-liner-to-kill-hanging-firefox.html Show Sample Output
Probably posted previously, I use this all the time to find and kill a process for "APP". Simply replace "APP" with the name of the process you're looking to kill.
Muestra el crecimiento de un archivo por segundo. Cambia el texto "FILE" por el nombre del archivo a monitorear. Comando LS + AWK Show Sample Output
After this command you can review doit.sh file before executing it. If it looks good, execute: `. doit.sh`
find . -maxdepth 1 -iname ".*" | awk 'NR >= 2' Can be used to list only dotfiles without . nor .. 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
when you can do it , avoid pipe Show Sample Output
I use this command to select a random movie from my movie collection.. Show Sample Output
Get external IP of the current machine via http://cmyip.com 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
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: