Skip to content

Instantly share code, notes, and snippets.

@penguinpowernz
Last active July 4, 2016 22:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save penguinpowernz/b3f39890440cec994dd7b7d5defa697f to your computer and use it in GitHub Desktop.
Save penguinpowernz/b3f39890440cec994dd7b7d5defa697f to your computer and use it in GitHub Desktop.
Standard Strongloop API node modules contents

Count of Files by Extension

This command generated this:

$ ls -lR|grep -vP "^total"|grep -vP "^./|^$|^d"|awk '{print $9}'|awk -F. '{print $NF}'|sort|uniq -c

It is not completely accurate but gives an idea.

    219 (NO EXTENSION)
      9 0
     36 1
      1 267a536740d68a0d840347285cb4567d
      1 3ctype
      8 a
      4 acorn
      9 address
     38 APACHE2
      1 apply
     39 AUTHORS
      4 b
      2 bar
      5 bat
      1 bcrypt
      8 bnf
     17 BSD
      1 build
      1 bump-version
      1 bundle
     23 c
      4 ca
      3 cake
     17 Cakefile
      9 calendar
      9 card
     15 cc
      2 cert
      1 changelog
      5 ChangeLog
      1 CHANGELOG
     17 CHANGES
      1 check-prepublish
      1 closure-compiler
      2 cmd
      4 CNAME
      6 cnf
     85 coffee
     26 conf
      3 CONTRIBUTORS
      1 cpuprofile
      1 crl
     20 crt
      2 csr
    636 css
      2 cssmin
      2 d
     10 deps
      1 diff
      8 Dockerfile
      2 e
      5 echo
    134 ejs
     14 eot
      1 esprima
      1 etsy
      4 exe
      3 express
      2 f
      1 file
      1 file1
      1 file2
      1 file3
      1 file4
      1 file5
      2 foo
      2 Gemfile
      3 gemspec
      1 generate-color-images
      1 gengo
      1 gengoall
      9 geo
     50 gif
      2 gitignore
     17 gnu
      1 go
      1 gradle
      1 gradlew
      9 gyp
      9 gypi
     21 gz
      1 gzip
    130 h
     87 handlebars
      9 har-validator
      2 hashes
      3 hbs
      1 heapsnapshot
      2 htm
    398 html
     45 hyper-schema
     12 ico
      4 id_dsa
      4 id_rsa
      1 iml
      9 in
      3 info
      1 ini
      9 interfaces
      8 jade
      3 Jakefile
      3 jar
      9 jpg
  29319 js
     16 js~
      1 jshint
     32 jsm
   5298 json
      1 json~
     36 json-ref
      1 jsstyle
      6 jst
      6 key
      1 land
      1 lb-ng
    839 less
      3 lessc
     55 LICENCE
    424 license
     35 License
   2143 LICENSE
      9 LICENSE-jsbn
     13 LICENSE-MIT
      2 LICENSE_python
     45 links
      2 lock
      3 log
      1 lsmodels
      1 MAINTAINERS
    254 Makefile
    127 map
    250 markdown
   4716 md
      2 md~
      1 meteor
      1 miller-rabin
     95 min
     39 MIT
      8 mk
      7 mkd
      1 mocha
      1 _mocha
      1 models
      2 ncp
      2 needle
     13 node
      1 node-pre-gyp
      3 NOTICE
      4 nuspec
     10 o
      1 old
     32 opts
      1 orig
      5 out
      2 OWNERS
      1 param
     23 patch
      6 pegjs
     23 pem
    974 png
     12 ppk
      1 prepublish
     35 priv
      1 Procfile
     28 pub
      3 py
      5 Rakefile
      3 rb
      9 README
      1 rej
      1 relgen
      3 render-2
      3 render-full
      1 run
      1 run-tests
      3 sass
     45 schema
      1 secret
      1 seed
      1 seeds
      1 seek-bunzip
      1 seek-bzip-table
     17 semver
     50 sh
      5 shjs
      1 sketch
      1 source-map
      2 sql
      3 srl
      4 ssh_host_dsa_key
      8 ssh_host_rsa_key
      9 sshpk-conv
      9 sshpk-sign
      9 sshpk-verify
      1 start
      2 Strongloop
      1 sublime-project
      1 sublime-workspace
    108 svg
      1 swagger
      2 swf
      1 switch
      3 tap
      3 tar
     22 targ
      3 test
      1 __testfile
      5 tgz
      3 tmpl
      1 TODO
      4 ts
     18 ttf
    399 txt
     16 types
      1 uglify
      4 uglifyjs
      1 UNLICENSE
     11 USAGE
     14 uuid
      1 VERSION
      2 which
      2 without_eval
     23 woff
     10 woff2
      1 wscat
     24 xml
      5 yaml
     25 yml
      3 yuml
      5 yz

Count of Files by Type

Here I used the following command to extract the type of file:

$ du -a --exclude=".git"|awk '{print $2}' |xargs file|awk '{print $2}'|sort|uniq -c
    450 a
  43970 ASCII
     44 assembler
     43 Bourne-Again
     10 BSD
    125 C
    139 C++
    131 cannot
     29 CLIPPER
     41 data
   9743 directory
      1 DOS
     10 Dyalog
     23 ELF
     14 Emacs
     14 Embedded
    150 empty
     94 exported
     10 FORTRAN
     50 GIF
     27 gzip
    771 HTML
      3 Java
      7 JPEG
      2 Macromedia
     77 makefile
     12 MS
    250 Pascal
      4 PE32
     83 PEM
    974 PNG
     14 POSIX
      1 Python
      8 Ruby
      1 SQLite
    107 SVG
    255 symbolic
      1 tar
      1 TI-XX
     31 troff
     18 TrueType
     27 unified
   2955 UTF-8
      4 very
     23 Web
     66 XML
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment