Blog

Benieuwd hoeveel regels code je project in beslag neemt?

Met de onderstaande syntax kan je het aantal regels tellen in .php bestanden:

find . -name '*.php' | xargs wc -l

Resultaat

iMac-van-David-van-der-Tuijn:ibexframework davidvandertuijn$ find . -name '*.php' | xargs wc -l
      30 ./application/bootstrap.php
      22 ./application/classes/Controller/Error.php
      22 ./application/classes/Controller/Home.php
      36 ./application/classes/Controller/Index.php
      18 ./application/config/authentication.php
      17 ./application/config/authorization.php
      25 ./application/config/database.php
      18 ./application/config/pagination.php
      17 ./application/config/routes.php
      17 ./application/i18n/de_DE.php
      17 ./application/i18n/fr_FR.php
      17 ./application/i18n/nl_NL.php
       1 ./application/views/error/404.php
       1 ./application/views/home.php
       6 ./application/views/index/footer.php
       0 ./application/views/index/header.php
      16 ./application/views/index.php
      42 ./index.php
      21 ./modules/pagination/classes/Pagination.php
      17 ./modules/pagination/config/pagination.php
       2 ./modules/pagination/views/pagination.php
     112 ./system/classes/Authentication.php
     192 ./system/classes/Authorization.php
      47 ./system/classes/Autoloader.php
      55 ./system/classes/Config.php
      48 ./system/classes/Controller/Template.php
      63 ./system/classes/Controller.php
      86 ./system/classes/Core.php
      44 ./system/classes/Csrf.php
      62 ./system/classes/Database.php
      19 ./system/classes/Environment.php
     186 ./system/classes/Form.php
     131 ./system/classes/Html.php
      45 ./system/classes/I18n.php
      14 ./system/classes/Ibex.php
      34 ./system/classes/Inflector.php
     217 ./system/classes/Model.php
     154 ./system/classes/Router.php
      26 ./system/classes/Url.php
     166 ./system/classes/Valid.php
     114 ./system/classes/Validation.php
      82 ./system/classes/View.php
    2259 total
Categorieën
UNIX PHP
Tags
find
Zoeken