Quick calculation file number and number of directories
Skill administrator (2000-12-22 22:35) 〖Back〗 〖Forward〗
The following statement can help you calculate how many files and how many directorys .. # ls -l * | grep "^ -" | wc -l ---- to count files # ls -l * | grep "^ D" | wc -l ----- To Count Dir can also turn the above statement into script or a Alias: ALIAS CNF = "ls -l * | GREP" ^ - "in / etc / bashrc l "Alias CND =" LS -L * | GREP "^ D" | wc -l "