Skip to content

Instantly share code, notes, and snippets.

@bockor
Created March 3, 2021 11:51
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 bockor/d1a1547b9e37a92f45c2c5fc14b3a096 to your computer and use it in GitHub Desktop.
Save bockor/d1a1547b9e37a92f45c2c5fc14b3a096 to your computer and use it in GitHub Desktop.
ipython // count number of files per file extension type in directory
from collections import Counter
file_list=!find /home/bruno/tbc/uwsgi/ -type f -name "*"
#print(file_list)
found_ext=[]
for f in file_list:
found_ext.append(f.split('/')[-1].split('.')[-1])
#print(found_ext)
print(Counter(found_ext))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment