Answers for "count number of files in a folder"

2

command to know number of files in a directory

ls | wc -l
Posted by: Guest on February-26-2020
2

How to count number of files in each directory

du -a | cut -d/ -f2 | sort | uniq -c | sort -nr
Posted by: Guest on June-11-2020
-1

count a number of file in a folder python

import os
len([item for item in os.listdir(folderPath)])
Posted by: Guest on April-17-2021

Code answers related to "count number of files in a folder"

Python Answers by Framework

Browse Popular Code Answers by Language