count script #!/bin/sh numOfArgs=$# if [ $numOfArgs -ne 1 ]; then echo -e "Usage: \nbash $0 dirForCount" exit -1 fi # args ROOTDIR=$1 # core part find $ROOTDIR -maxdepth 1 -type d | sort | while read dir; do count=$(find "$dir" -type f | wc -l) echo "$dir: $count" done implement
Summarize The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links You may also be interested in:
|
<<: mysql join query (left join, right join, inner join)
>>: How to import js configuration file on Vue server
nginx traffic control Rate-limiting is a very use...
When installing in MySQL 8.0.16, some errors may ...
Table of contents 1. Scenario Description 2. Solu...
This article example shares the specific code of ...
1. Background Recently, some friends encountered ...
This article mainly introduces the sql script fun...
Web design and development is hard work, so don...
MySQL installation tutorial, for your reference, ...
Concurrency Functions time for i in `grep server ...
This article uses examples to explain the princip...
Project scenario: When running the Vue project, t...
Preface This is an old demand, but there are stil...
1. Check the kali linux system version Command: c...
Web Services are concerned with application-to-ap...
Maybe everyone knows that js execution will block...