LoginSignup
4
4

More than 5 years have passed since last update.

対象ディレクトリ以下のファイル数を「各ディレクトリとその直下のファイル数」というセットで書き出す

Last updated at Posted at 2014-05-19

下の例では'.svn'以下のファイルを除いています。

for d in `find target_directory -type d -name '.svn' -prune -o -type d -print`; do echo $d,`$cd $d; echo $(ls -1F | grep -v /) | wc -w`; done > file_count
4
4
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
4
4