【发布时间】:2015-05-25 01:39:35
【问题描述】:
我是一个新的 linux 用户。我正在尝试计算 home(~) 目录中的所有文件文件。在以下步骤中也是如此 -
-
ls -1 > fileCount # list each file in separate line and places them in fileCount -
wc -l fileCount # word count from the file fileCount
上述过程为我提供了正确的文件数。但这是一个有点冗长的过程,需要生成一个文件。
有没有更好的方法来计算当前目录中的所有文件?
提前致谢。
【问题讨论】: