Searches for *.cpp and *.h in directory structure, counts the number of lines for each matching file and adds the counts together. Show Sample Output
looks at html for "ip" (it's a CSS class), then a little of cut and egrep to get IPv4 address. I use this oneliner into conky. Show Sample Output
No params Show Sample Output
count & sort one field of the log files , such as nginx/apache access log files .
Get the list of changed files between revision 43 and HEAD revision: svn diff . -r43:HEAD --summarize Strip extra 8 characters from every line: cut -c9-99999 Copy the listed files to home/me/destination: cpio -pvdmu ~/destination Make a plain copy (-p), list files being copied (-v), create needed directories (-d), preserve modification time (-m), overwrite unconditionally (-u) Show Sample Output
This functionality seems to be missing from commands like dpkg. Ideally, I want to duplicate the behavior of rpm --verify, but it seems difficult to do this in one relatively short command pipeline. Show Sample Output
Used in OS X. tr "\n" ";" may be replaced by echo ";" with linux versions of date. I reused ping -q -c 1 www.google.com|tail -1|cut -d/ -f5 Show Sample Output
instead of printing the whole line, print just the capture matched, but with the "cut" pipe :( I'm so sad with grep. Show Sample Output
dumpfile is a CSV file, which its 1st field is a phone number in format CC+10 digits Empty lines are deleted, before the output in format "prefix,ocurrences" Show Sample Output
This command give you Just the Network Cidr Notation Show Sample Output
Credit for the awk command goes to: http://www.cyberciti.biz/faq/howto-move-migrate-user-accounts-old-to-new-server/
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: