【发布时间】:2014-03-06 19:24:10
【问题描述】:
在这篇帖子中:Count files and directories using shell script,DogBane 于 2012 年 12 月 5 日给出了这个回复:
FILECOUNT="$(find . -type f -maxdepth 1 -printf x | wc -c)"
DIRCOUNT="$(find . -type d -maxdepth 1 -printf x | wc -c)"
谁能告诉我 -printf 后面的 x 是什么意思或用途?
谢谢。
【问题讨论】:
-
这是另一种的说法:
FILECOUNT="$(find . -type f -maxdepth 1 | wc -l)"...如果有帮助的话...