1) Statistics the number of files under the current folder
Copy Code code as follows:
2) Statistics the number of directories under the current folder
Copy Code code as follows:
3 Statistics The number of files under the current folder, including subfolders
Copy Code code as follows:
4 Statistics folder under the number of directories, including subfolders in the
Copy Code code as follows:
Description
Copy Code code as follows:
Long list output file information in the current folder (note the file here, different from the general file, may be directories, links, device files, etc.)
Copy Code code as follows:
Here the long list output information filter part, only the general file, if only keep the directory is ^d
Copy Code code as follows:
Statistics output The number of rows, because has been filtered only general file, so the statistical result is the number of general file information, and because a line of information corresponding to a file, so that is the number of files.