Created
March 3, 2021 11:51
-
-
Save bockor/d1a1547b9e37a92f45c2c5fc14b3a096 to your computer and use it in GitHub Desktop.
ipython // count number of files per file extension type in directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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