This command will find the highest context switches on a server and give you the process listing. Show Sample Output
Lists the size in human readable form and lists the top 25 biggest directories/files
if you have a capture file *.eth, and ajp protocol is in use on port 9009, you can paste the above command. You can change the fiile and port name Show Sample Output
Shows the ?rendering? for each of the 256 colours in both the bold and normal variant. Using seq is helpful to get even lines, passing $((COLUMNS*2)) to column sort-of-handles the nonprintable characters.
This command will take the files in a directory, rename them, and then number them from 1...N. Black belt stuff. Hell of a time saver.
It'll print the file names preserving the spaces in their names and adding new line after every new filename. I wrote this to quickly find out how many files in any directory is owned by a particular user. This can be extended using pipe and grep to do much more. Show Sample Output
The '1' in '%01d' changes the amounts of digits in the integer, eg. 1 vs 0001.
clear command doesn't actually clear the terminal because if you scroll you can still see output from the previous commands. Using this command you can clear your terminal screen as well as buffer.
This will strip out the relivent disk information from kvm. I'm using it to find disks on a SAN which are no longer in use. Show Sample Output
for redhat systems works sometimes :S tested on dell poweredge r7+ systems
Extracts domain and subdomain from given URl. See examples. Show Sample Output
Use case insensitive regex to match files ending in popular video format extensions and calculate their total time. (traverses all files recursively starting from the current directory) Show Sample Output
Usage:
command | hl 'regex'
Caution: distructive overwrite of filenames Useful for concatenating pdfs in date order using pdftk
ipscore <your ip>
number
ipscore 186.78.151.135
2
a high score represents a bad remote address (honeypot, tor, botnet..)
Show Sample Output
The sample output shows each record/row with the last field zero-padded to 26 digits. For testing, I used (L)ine and field/column numbers.... Line 4, field2 = L42, etc up to the last field where I just used line numbers X 4. I had some whitespace-delimited files with variable-length records/rows (having 4 - 5 fields/columns) which required reformatting by zero-padding the last field to 26 digits. This requires setting NF (Not $NF) as an awk variable, with a simple conditional that assumes that any line where (N)umber of (F)ields does NOT equal 4 has a NF of 5. If needed, more conditional checks can be added, and the "NF" changed to any field ($1, $5, etc). Show Sample Output
from a svn repo, print a log, with diff, of each commit touching a given file
When you want to know the duration of all your mp3 files in the current working directory this command will tell you based on exif data. Since it relies on exif data it can be used against other files like movies, ogg vorbis etc. also. Useful when you want to know how long it will take to listen to an album or series of lectures. Show Sample Output
rhyme time
mime
rhyme lowrez
Juarez
Works for fixed count of repeats because of the {1..20}. For variable count, replace "{1..20}" by "$(seq 1 $n)". Show Sample Output
Clears the history, clear the terminal and clear the scroll-back. The .bash_history will not be affected but every command done before will NOT be recorded to .bash_history. The CTRL+R won't show previous commands and it will be impossible to scroll-up to see what you've done so far. In a word, it cover your tracks.
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: