this command will install the packages which provides the libraries you need to link with, e.g. when you compile something needs opengl libraries: gcc -o testgl testgl.c -lGLEW -lGL -lGLU -lglut you can use `/usr/lib/libGLEW.so /usr/lib/libGL.so /usr/lib/libGLU.so /usr/lib/libglut.so'
Use ps instead of top. But do not use BSD options at all, they are confusing. Use "s=" or "state=" to show consice process statuses. Show Sample Output
count connections, group by IP and port
If your version of curl does not support the --compressed option, use
curl -s http://funnyjunk.com | gunzip
instead of
curl -s --compressed http://funnyjunk.com
Count and Find all IP connected to my host through TCP connection. Show Sample Output
vim 7 required
Change "sort -f" to "sort" and "uniq -ic" to "uniq -c" to make it case sensitive. Show Sample Output
My script lists all users & the number of commits they made in the period, sorted alphabetically. To sort by number of commits, append a '|sort' to the end of the command. The script depends on the output format of svn log - original command didn't work for me because the string 'user' was not appearing in my output
Very useful for logs
This command will help you to find how many number of connection are made to given mysql and what are the different hosts connected to it with number of connection they are making. Show Sample Output
Detect duplicate UID in you /etc/passwd (or GID in /etc/group file). Duplicate UID is often forbidden for it can be a security breach. Show Sample Output
useful to count events in logs Show Sample Output
useful to count events in logs @see: http://www.commandlinefu.com/commands/view/10327/report-summary-of-string-occurrence-by-time-period-hour#comment Show Sample Output
depends on date format locale ... Show Sample Output
the
find -printf "%f\n" prints just the file name from the given path. This means directory paths which contain extensions will not be considered.
Show Sample Output
The listing will be nice separated with dashes in chunks of identical files. Output format: Size Inode Mode Count_of_identical_files UID GID Date Time Path/Filename Show Sample Output
cut -f1,2 - IP range 16 cut -f1,2,3 - IP range 24 cut -f1,2,3,4 - IP range 24 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: