文件个数 ls -l |grep "^-"|wc -l 文件夹个数 ls -l |grep "^d"|wc -l 转载于:https://www.cnblogs.com/kakaisgood/p/8183459.html