How To Count Files in Directory on Linux

$ ls | wc -l
$ ls /etc | wc -l

268

Count Files using tree

An easy way of counting files and directories in a directory is to use the “tree” command and to specify the name of the directory to be inspected.

$ tree <directory>
赞(0)
未经允许不得转载:PHPez » How To Count Files in Directory on Linux

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址