28 September, 2016

Count the number of files per directory in the Filesystem

When you need to know the number of files in a directory tree you can use the following sentence:
find ~ -type d -exec sh -c "fc=\$(find '{}' -type f | wc -l); echo -e \"\$fc\t{}\"" \; | sort -nr

No comments:

Post a Comment

Redirection in IIS

 This config will redirect every request to https://www.domain.com <configuration>     <system.webServer>         <rewrite>...