count腳本
#!/bin/shnumOfArgs=$#if [ $numOfArgs -ne 1 ]; then echo -e "Usage: /nbash $0 dirForCount" exit -1fi# argsROOTDIR=$1# core partfind $ROOTDIR -maxdepth 1 -type d | sort | while read dir; docount=$(find "$dir" -type f | wc -l)echo "$dir: $count"done
執(zhí)行
$ bash count.sh benchmark
benchmark: 2317
benchmark/0: 20
benchmark/1: 891
benchmark/2: 65
benchmark/3: 13
benchmark/4: 1328
總結(jié)
以上就是這篇文章的全部內(nèi)容了,希望本文的內(nèi)容對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,謝謝大家對(duì)VEVB武林網(wǎng)的支持。
新聞熱點(diǎn)
疑難解答
圖片精選