LoginSignup
1
2

More than 5 years have passed since last update.

UNIXであるサブディレクトリの各ファイル数を出力するshellコマンド

Posted at
for d in `find . -type d -maxdepth 1`; do echo $d, `ls "$d" | wc -l`; done 

出力結果

./dir1,102
./dir2,43
./dir3,54
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2