Per country GET report, based on access log. Easy to transform to unique IP Show Sample Output
Useful to check DDoS attacks on servers. Show Sample Output
Here's a version that doesn't use find.
Another one. Maybe not the quicker because of the sort command, but it will also look in other man sections. updated with goodevilgenius 'shuf' idea
PmWiki stores wiki pages as Group.Name. Simply split the directory listing and count frequency of group occurances. Show Sample Output
If both file1 and file2 are already sorted: comm -13 file1 file2 > file-new
Seeing that _sort_ its been used, why not just _use_ it. ;) Show Sample Output
A different approach to the problem - maintain a small sorted list, print the largest as we go, then the top 10 at the end. I often find that the find and sort take a long time, and the large file might appear near the start of the find. By printing as we go, I get better feedback. The sort used in this will be much slower on perls older than 5.8. Show Sample Output
Finds files modified today since 00:00, removes ugly dotslash characters in front of every filename, and sorts them. *EDITED* with the advices coming from flatcap (thanks!)
Found this one little more for me. This one removes the perl dependency (from command 2535). Source for command : http://www.earthinfo.org/linux-disk-usage-sorted-by-size-and-human-readable/ Show Sample Output
Use the hold space to preserve lines until data is needed.
All with only one pipe. Should be much faster as well (sort is slow). Use find instead of ls for recursion or reliability. Edit: case insensitive Show Sample Output
Find top 5 big files
This command might not be useful for most of us, I just wanted to share it to show power of command line. Download simple text version of novel David Copperfield from Poject Gutenberg and then generate a single column of words after which occurences of each word is counted by sort | uniq -c combination. This command removes numbers and single characters from count. I'm sure you can write a shorter version. Show Sample Output
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 command is more robust because it handles spaces, newlines and control characters in filenames. It uses printf, not ls, to determine file size.
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: