JAMEL ESSOUSSI

mercredi 10 juin 2015

How to count nbr of linesin all the files of a directory?

find . -type f | xargs wc -l

find . -type f | grep .py$ | xargs wc -l

find . -name "*.py" | xargs wc -l
Posted by Jamel ESSOUSSI at 08:21 Aucun commentaire:
Envoyer par e-mailBlogThis!Partager sur XPartager sur FacebookPartager sur Pinterest

mardi 9 juin 2015

How to count occurrences of a word in all the files of a directory?

grep -roh {WORD} {DIR_PATH} | wc -w

Posted by Jamel ESSOUSSI at 05:04 Aucun commentaire:
Envoyer par e-mailBlogThis!Partager sur XPartager sur FacebookPartager sur Pinterest
Articles plus récents Articles plus anciens Accueil
Inscription à : Articles (Atom)

Acceuil

  • Accueil
Powered By Blogger

Qui êtes-vous ?

Ma photo
Jamel ESSOUSSI
Afficher mon profil complet

Archives du blog

  • ▼  2015 (2)
    • ▼  juin (2)
      • How to count nbr of linesin all the files of a dir...
      • How to count occurrences of a word in all the file...
  • ►  2014 (2)
    • ►  février (2)
  • ►  2013 (2)
    • ►  décembre (1)
    • ►  mai (1)
  • ►  2012 (5)
    • ►  juin (1)
    • ►  mai (1)
    • ►  février (1)
    • ►  janvier (2)
  • ►  2011 (5)
    • ►  mars (5)
  • ►  2010 (2)
    • ►  mai (1)
    • ►  février (1)
jamel.essoussi@gmail.com. Thème Awesome Inc.. Fourni par Blogger.