Generally speaking, the number of subfolders and files in the system is very large, we can't count them one by one, but in Linux, we can Display the view by command.
Here's how:
find command to view (recommended):
all subdirectories number:
[root @ localhost ~] # find pma -type d |
Wc -l
125
[root@localhost ~]# find pma/-type d |
Wc -l
125
[root@localhost ~]# find pma/* -type d |
Wc -l
124 --correct
Reasons for different results:
[root@localhost ~]# find pma -type d |
More
pma -- the first line of output
[root@localhost ~]# find pma/* -type d |
More
pma/examples -- output first line
Summary: Use pma/* does not include the parent directory of pma, only the subdirectories under it.
Number of all files:
[root@localhost ~]# find pma -type f |
Wc -l
987
[root@localhost ~]# find pma/-type f |
Wc -l
987
[root@localhost ~]# find pma/* -type f |
Wc -l
987
tree command view (not recommended):
[root@localhost ~]# tree pma
……< Br>
124 directories, 984 files
---------------------------------- -------
[root@localhost ~]# tree pma/
……
124 directories, 984 files
Du command to view:
[root@localhost ~]# du -ah pma/* |
Wc -l
1111
Summary: The result of du view is 1111, the number of subdirectories is 124, and the number of files is: 1111-124=987, so the result of the tree command should be Inaccurate, as for which file is less calculated, this problem is not checked, it is recommended to use the find command to view.
The above are two ways to view the number of subfolders and files. As mentioned above, Xiaobian thinks that using the find command to display the view will be relatively accurate. If friends and friends have a more convenient way, welcome to interact with Xiaobian.
With the upgrade of hardware devices, in order to support these hardware, the updat
Mirroring is often very large in Linux, but using Docker images is an exception. Wi
Linux multi-path refers to the connection between the host and the hard disk, and also includes the
Zypper is a program for managing software under SUSE Linux. It has multiple functio
Ubuntu how to access samba server without password
Two ways to speed up the copying speed of Linux files
Linux command shutdown restart command usage summary
Linux manual shutdown of the firewall steps
What should I do if the Ubuntu login screen resolution is too high?
What are the common commands for Linux rookie?
How to deal with the disappearance of ibus input method icon after upgrading Ubuntu 12.04?
Linux viewing system installed kernel operation method
CentOS telnet exit failure solution
How to use the command to monitor the server under Linux
What should I do if I install a graphics card driver error on Ubuntu 13.10?
Design and create personality Windows 8 system start screen
Vmware7 virtual machine installation Win10 method
How to disable the driver forced signature in Win10 system
CF flash week to open popular weapons low-cost spike
How to do win8 wireless network restrictions