Hide

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again.

Delete that bloated snippets file you've been using and share your personal repository with the world. 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.


Get involved!

You can sign-in using OpenID credentials, or register a traditional username and password.

First-time OpenID users will be automatically assigned a username which can be changed after signing in.

Universal configuration monitoring and system of record for IT.
Hide

Stay in the loop…

Follow the Tweets.

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

Subscribe to the feeds.

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:

Hide

News

May 19, 2015 - A Look At The New Commandlinefu
I've put together a short writeup on what kind of newness you can expect from the next iteration of clfu. Check it out here.
March 2, 2015 - New Management
I'm Jon, I'll be maintaining and improving clfu. Thanks to David for building such a great resource!
Hide

Top Tags

Hide

Functions

Psst. Open beta.

Wow, didn't really expect you to read this far down. The latest iteration of the site is in open beta. It's a gentle open beta-- not in prime-time just yet. It's being hosted over at UpGuard (link) and you are more than welcome to give it a shot. Couple things:

  • » The open beta is running a copy of the database that will not carry over to the final version. Don't post anything you don't mind losing.
  • » If you wish to use your user account, you will probably need to reset your password.
Your feedback is appreciated via the form on the beta page. Thanks! -Jon & CLFU Team

Prints total line count contribution per user for an SVN repository

Terminal - Prints total line count contribution per user for an SVN repository
svn ls -R | egrep -v -e "\/$" | xargs svn blame | awk '{print $2}' | sort | uniq -c | sort -r
2009-07-29 02:10:45
User: askedrelic
Functions: awk egrep ls sort uniq xargs
16
Prints total line count contribution per user for an SVN repository

I'm working in a group project currently and annoyed at the lack of output by my teammates. Wanting hard metrics of how awesome I am and how awesome they aren't, I wrote this command up.

It will print a full repository listing of all files, remove the directories which confuse blame, run svn blame on each individual file, and tally the resulting line counts. It seems quite slow, depending on your repository location, because blame must hit the server for each individual file. You can remove the -R on the first part to print out the tallies for just the current directory.

Alternatives

There are 5 alternatives - vote for the best!

Terminal - Alternatives
svn ls -R | egrep -v -e "\/$" | tr '\n' '\0' | xargs -0 svn blame | awk '{print $2}' | sort | uniq -c | sort -nr
2013-04-10 19:37:53
User: rymo
Functions: awk egrep ls sort tr uniq xargs
Tags: svn count
1

make usable on OSX with filenames containing spaces. note: will still break if filenames contain newlines... possible, but who does that?!

svn ls -R | egrep -v -e "\/$" | xargs svn blame | awk '{count[$2]++}END{for(j in count) print count[j] "\t" j}' | sort -rn
2013-05-03 01:45:12
User: kurzum
Functions: awk egrep ls sort xargs
Tags: svn count
0

This one has a better performance, as it is a one pass count with awk. For this script it might not matter, but for others it is a good optiomization.

Know a better way?

If you can do better, submit your command here.

What others think

i wholeheartedly agree and thank you for this post.

Comment by josue 390 weeks and 4 days ago

Thanks. Great contribution.

Comment by linuxrawkstar 390 weeks and 4 days ago

nice!

Comment by bwoodacre 390 weeks and 3 days ago

SWEET.

Comment by dorkusprime 353 weeks and 2 days ago

sort -r should have been sort -nr (so that it sorts numerically, and not alphabetically!)

Comment by abdc 273 weeks and 3 days ago

is there any way to limit this to show line count per day?

Comment by cmcguff 260 weeks and 4 days ago

If you intend to accumulate economical Watches, use the purchasing suggestions above. One will require a smart replacement of receiving a duplicate as opposed to the genuine article. Nevertheless, via a your style, the numerous other methods usually are alternatively useful all of which will surely allow you to get the actual bags you prefer at a rate you would possibly buy.Jacquetta Wheeler utilized any grape as well as dark sewed dolman changes outfit, dark-colored Mikaela shoes or boots and black color clutch most from your Website The autumn months 2013 variety.Michael Kors Website bags might be found out constantly in place such as Saks 6th Probability, Bergdorf Goodman, Macy's and various other high-end electrical socket local store. The bags lower in the luxurious item category and therefore are understand with regard to their smooth as well as brilliant look.Check the Items handily offered - Athletic shoes may be situated in unrestricted styles, because of this, check out the variety of assortment the outlet delivers in addition to look at the rates seeing that obtainable in the manufacturer labels web site. If your web site offers some in fact unprecedented variety to suit your needs up for grabs, which you have really certainly not noticed any place else, you could possibly put your money on that.Bleecker Highway may be the dwelling of varied of fashion trend's primary product labels -- Marc Jacobs, Ralph Lauren, Lulu Guinness. This specific November, will unquestionably add his or her http://www.hermesbeltsbirkinkellybag.co.uk/ draw for the prominent Western Area remove as stated simply by WWD on the web. Kors definitely will levels a 60 minute,475 square-foot life-style shop featuring add-ons and different other stuff through the model. Your ensemble store will likely be situated in Olive & & Bette's earlier location in 384 Bleecker Route.Balenciaga bags are lots of of the extremely made an effort to discover soon after bags in the world. Balenciaga totes are produced with a human being of the most extremely adored makers inside market, Cristobal Balenciaga. They created the concept of Balenciaga inside the particularly beginning Twentieth century within San Sebastian, Spain and later on spread out around the world beyond this concept. With the middle of the Twentieth century, Balenciaga been on simple fact spread out towards the critical towns involving The city and also Spain's capital along with for you to Paris, france. Using its highly valued traditions, Balenciaga continuouslies produce outstanding elegant purses nowadays.The Casio vistas you observe right now weren't commenced with a observe and also an equipment agency which can be really outstanding for the premium quality and fantastic forms of Casio views the truth is these days. Within 1946, Casio had been create along with Tadio Kashio because designer on this sensible firm. Throughout now, Okazaki, japan is at the midst of The other earth fight, the actual situation in financial terms regarding China including many other Western european nations around the world has been severe. At the time any time Mister. Kashio began his / her business, they was at thinks of rendering it massive anf the husband would this while using advancement of the yubiwa pipeline.Today, a wrist watch isn't basically something you utilize to tell occasion. Truly, an eye fixed is definitely an growth of yourself. You could learn just about all type of watches to share with you your character, your own kind, or equally an eye catcher with cheap deals connected with jewels. The issue is when you attain web or on the mall?

Comment by stephanieg915 5 days ago

The earth is full of businessmen and also the those who have concern about advertising employment they need to stop by at various other areas, locations and in many cases international locations intended for day or two which will additionally be a 1 days official tour. To make sure they call for a form of bag which should be simply handled therefore for them there seemed to be one of a kind kind of Dunlop bags that any good advent that can help as their one who requires these individuals.The Dunlop bag is easily easily transportable and could be treated by means of palms since they supply a lesser amount of area to keep thing because you keep some cloths in it and several crucial equipment you need in your daily life. These kind of bags are also utilized institution along with college bags since they be capable of maintain hefty guide from it. They may be contain unique synthetic leather material that you already know just is a essentially the most trusted material in order to keep a person issue while they maintain things safe from drinking water and other insects which often indulge these individuals.History regarding Dunlop bagsThe Dunlop bags usually are comprised primarily for your sports males who must keep their taking part in equipment from it which enable it to take it any place for example for anyone who is cricket gamer you will need http://www.hermesbeltsbirkinkellybag.co.uk/ and keep headgear, safety gloves along with other protects and so on to make sure they supply you broad room foe hundreds of points. The actual Dunlop bags will be sports activities based mostly British isles makes which had been bring in in 1928 specifically for that athletics like playing golf, potatoes and playing golf. The actual Dunlop bags are much loved by the famous runners with Nineteen seventies for you to Nineteen eighties nevertheless it are more have been in marketplace.Dunlop bags are used for individuals who every day work out throughout gym they are able to maintain their hand protection in addition to mineral water container they will need to have down the determine you can also help keep you handkerchief from it to remove the particular perspire that was bring about as a result of large exercise.

Comment by stephanieg915 5 days ago

www.canadagoosefemmehomme2016.fr/femme-canadian-goose_104.html

www.canadagoosefemmehomme2016.fr/manteau-canada-goose-enfant_405.html

www.canadagoosefemmehomme2016.fr/canada-goose-chilliwack-femme-occasion_464.html

www.canadagoosefemmehomme2016.fr/canada-goose-montebello-parka_81.html

www.canadagoosefemmehomme2016.fr/canada-goose-outlet-france_122.html

www.canadagoosefemmehomme2016.fr/canada-goose-pas-cher-paris_354.html

www.canadagoosefemmehomme2016.fr/nouvelle-canada-goose_193.html

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-montebello-femme_128.html

www.canadagoosefemmehomme2016.fr/canada-goose-officiel_380.html

www.canadagoosefemmehomme2016.fr/bonnet-canada-goose_289.html

www.canadagoosefemmehomme2016.fr/constable-canada-goose_67.html

www.canadagoosefemmehomme2016.fr/canada-goose-mountaineer_477.html

www.canadagoosefemmehomme2016.fr/magasin-canada-goose_93.html

www.canadagoosefemmehomme2016.fr/vetement-goose-canada_345.html

www.canadagoosefemmehomme2016.fr/destockage-canada-goose_286.html

www.canadagoosefemmehomme2016.fr/manteau-canada-goose-pas-cher_42.html

www.canadagoosefemmehomme2016.fr/canada-goose-parka-homme_339.html

www.canadagoosefemmehomme2016.fr/canada-goose-whistler_318.html

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-solde_316.html

www.canadagoosefemmehomme2016.fr/expedition-parka-canada-goose_210.html

www.canadagoosefemmehomme2016.fr/parajumpers-ou-canada-goose_87.html

www.canadagoosefemmehomme2016.fr/veste-canada-goose-femmes_189.html

www.canadagoosefemmehomme2016.fr/canada-canada-goose_246.html

www.canadagoosefemmehomme2016.fr/parka-canada-goose-occasion_186.html

Comment by sguerra376 3 days ago

http://www.canadagoosefemmehomme2016.fr/prix-canada-goose-canada_416.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-france-site-officiel_307.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-milan_99.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-bebe_436.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-borden-bomber_196.html

http://www.canadagoosefemmehomme2016.fr/pas-cher-canadian-goose_219.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-point-de-vente_371.html

http://www.canadagoosefemmehomme2016.fr/destockage-canada-goose_286.html

http://www.canadagoosefemmehomme2016.fr/vente-canada-goose-montreal_160.html

http://www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-femme-prix_362.html

http://www.canadagoosefemmehomme2016.fr/manteau-femme-canada-goose_248.html

http://www.canadagoosefemmehomme2016.fr/manitoba-canada-goose_482.html

http://www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-femme-occasion_164.html

http://www.canadagoosefemmehomme2016.fr/palliser-canada-goose_261.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-chilliwak_109.html

http://www.canadagoosefemmehomme2016.fr/manteau-type-canada-goose_369.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-grise-homme_468.html

http://www.canadagoosefemmehomme2016.fr/doudoune-style-canada-goose-femme_388.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-chateau-parka_247.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-pas-cher-homme_161.html

http://www.canadagoosefemmehomme2016.fr/veste-style-canada-goose_223.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-femme-bleu-marine_151.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-ca_288.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-femme-noir_48.html

http://www.canadagoosefemmehomme2016.fr/magasin-canada-goose-a-paris_387.html

Comment by sguerra376 3 days ago

www.canadagoosefemmehomme2016.fr/canada-goose-victoria-parka_462.html

www.canadagoosefemmehomme2016.fr/goose-canada-femme_476.html

www.canadagoosefemmehomme2016.fr/canada-goose-camp-hoody_50.html

www.canadagoosefemmehomme2016.fr/palliser-canada-goose_261.html

www.canadagoosefemmehomme2016.fr/blouson-canada-goose-pas-cher_78.html

www.canadagoosefemmehomme2016.fr/yorkville-canada-goose_463.html

www.canadagoosefemmehomme2016.fr/livigno-canada-goose_72.html

www.canadagoosefemmehomme2016.fr/prix-canada-goose-enfant_75.html

www.canadagoosefemmehomme2016.fr/canada-goose-montebello-noir_170.html

www.canadagoosefemmehomme2016.fr/marque-doudoune-canada-goose_74.html

www.canadagoosefemmehomme2016.fr/heli-arctic-canada-goose_441.html

www.canadagoosefemmehomme2016.fr/canada-goose-france-site-officiel_307.html

www.canadagoosefemmehomme2016.fr/canada-goose-bebe_436.html

www.canadagoosefemmehomme2016.fr/chaussure-canada-goose_230.html

www.canadagoosefemmehomme2016.fr/femmes-canada-goose_281.html

www.canadagoosefemmehomme2016.fr/gilet-canada-goose_185.html

www.canadagoosefemmehomme2016.fr/canada-goose-bomber_402.html

www.canadagoosefemmehomme2016.fr/borden-canada-goose_442.html

www.canadagoosefemmehomme2016.fr/parka-chateau-canada-goose_94.html

www.canadagoosefemmehomme2016.fr/femme-canadian-goose_104.html

www.canadagoosefemmehomme2016.fr/langford-canada-goose_290.html

www.canadagoosefemmehomme2016.fr/canada-goose-langford_320.html

www.canadagoosefemmehomme2016.fr/canada-goose-homme-solde_255.html

www.canadagoosefemmehomme2016.fr/canada-goose-site_385.html

www.canadagoosefemmehomme2016.fr/canada-goose-chilliwack-enfant_431.html

www.canadagoosefemmehomme2016.fr/ou-acheter-canada-goose-en-france_308.html

www.canadagoosefemmehomme2016.fr/manitoba-canada-goose_482.html

Comment by sguerra376 3 days ago

http://www.canadagoosefemmehomme2016.fr/prix-d-une-doudoune-canada-goose_390.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-moncler_415.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-femme-grise_145.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-bomber-chilliwack_119.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-fourrure-amovible_71.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-aviateur_449.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-chateau-noir_174.html

http://www.canadagoosefemmehomme2016.fr/blouson-canada-goose-pas-cher_78.html

http://www.canadagoosefemmehomme2016.fr/doudoune-goose-canada_292.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-promo_172.html

http://www.canadagoosefemmehomme2016.fr/marque-doudoune-canada-goose_74.html

http://www.canadagoosefemmehomme2016.fr/boutique-canada-goose-montreal_456.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-victoria-parka_462.html

http://www.canadagoosefemmehomme2016.fr/ou-acheter-canada-goose_100.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-dawson-parka_374.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-femme-victoria_285.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-foxe_91.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-femme-occasion_262.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-payer-en-3-fois_242.html

http://www.canadagoosefemmehomme2016.fr/veste-canada-goose-femme-pas-chere_357.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-prix-canada_277.html

http://www.canadagoosefemmehomme2016.fr/parka-canada-goose-femme_123.html

http://www.canadagoosefemmehomme2016.fr/avis-sur-canada-goose_334.html

Comment by sguerra376 2 days ago

www.canadagoosefemmehomme2016.fr/canada-goose-freestyle_324.html

www.canadagoosefemmehomme2016.fr/parka-homme-canada-goose_84.html

www.canadagoosefemmehomme2016.fr/tuque-canada-goose_439.html

www.canadagoosefemmehomme2016.fr/canada-goose-pas-cher-homme_161.html

www.canadagoosefemmehomme2016.fr/canada-goose-xxs_391.html

www.canadagoosefemmehomme2016.fr/vente-de-canada-goose_361.html

www.canadagoosefemmehomme2016.fr/canada-goose-champs-elysees_360.html

www.canadagoosefemmehomme2016.fr/manteau-canada-goose-pas-cher_42.html

www.canadagoosefemmehomme2016.fr/canada-goose-quebec_125.html

www.canadagoosefemmehomme2016.fr/doudoune-homme-canada-goose_366.html

www.canadagoosefemmehomme2016.fr/canada-goose-chilliwack-homme_298.html

www.canadagoosefemmehomme2016.fr/canada-goose-a-montreal_306.html

www.canadagoosefemmehomme2016.fr/canada-goose-entrepot_141.html

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-chilliwack-femme_473.html

www.canadagoosefemmehomme2016.fr/canada-goose-solaris-parka_375.html

www.canadagoosefemmehomme2016.fr/blouson-goose-canada_195.html

www.canadagoosefemmehomme2016.fr/canada-goose-calgary_278.html

www.canadagoosefemmehomme2016.fr/canada-goose-femme-trillium_201.html

www.canadagoosefemmehomme2016.fr/canada-goose-paris-magasin_420.html

www.canadagoosefemmehomme2016.fr/magasin-canada-goose-paris_39.html

www.canadagoosefemmehomme2016.fr/canada-goose-distributeur_365.html

www.canadagoosefemmehomme2016.fr/chateau-parka-canada-goose_225.html

Comment by sguerra376 2 days ago

http://www.canadagoosefemmehomme2016.fr/canada-goose-femme-trillium_201.html

http://www.canadagoosefemmehomme2016.fr/skreslet-parka-canada-goose_469.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-rabais_88.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-noir-femme_346.html

http://www.canadagoosefemmehomme2016.fr/veste-canada-goose-pas-cher_200.html

http://www.canadagoosefemmehomme2016.fr/magasin-canada-goose-france_216.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-paris_394.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-solde_55.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-whistler_318.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-hybridge-hoody_382.html

http://www.canadagoosefemmehomme2016.fr/vetements-canada-goose_64.html

http://www.canadagoosefemmehomme2016.fr/nouvelle-collection-canada-goose_451.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-outlet-france_122.html

http://www.canadagoosefemmehomme2016.fr/prix-canada-goose_398.html

http://www.canadagoosefemmehomme2016.fr/doudoune-goose-canada_292.html

http://www.canadagoosefemmehomme2016.fr/branta-canada-goose_271.html

http://www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-rose_421.html

http://www.canadagoosefemmehomme2016.fr/parka-montebello-canada-goose_379.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-montebello_383.html

http://www.canadagoosefemmehomme2016.fr/canada-gooser_220.html

http://www.canadagoosefemmehomme2016.fr/veste-canada-goose_228.html

http://www.canadagoosefemmehomme2016.fr/manteau-comme-canada-goose_226.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-pas-cher-paris_354.html

http://www.canadagoosefemmehomme2016.fr/avis-sur-canada-goose_334.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-montebello-parka_81.html

Comment by sguerra376 22 hours ago

http://www.canadagoosefemmehomme2016.fr/canada-goose-couleur_471.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-montpellier_353.html

http://www.canadagoosefemmehomme2016.fr/victoria-parka-canada-goose_338.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-marron_208.html

http://www.canadagoosefemmehomme2016.fr/montebello-parka-canada-goose_287.html

http://www.canadagoosefemmehomme2016.fr/veste-canada-goose-homme_474.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-style_105.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-freestyle_324.html

http://www.canadagoosefemmehomme2016.fr/achat-canada-goose-en-ligne_153.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-homme-pas-cher_440.html

http://www.canadagoosefemmehomme2016.fr/veste-canada-goose-femmes_189.html

http://www.canadagoosefemmehomme2016.fr/goose-femme_52.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-doudoune_163.html

http://www.canadagoosefemmehomme2016.fr/goose-canada_169.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-moncler_415.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-authentique_434.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-dawson-parka_374.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-distributeur_365.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-toulouse_459.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-chateau-parka_247.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-accessoires_183.html

Comment by sguerra376 21 hours ago

Your point of view

You must be signed in to comment.