Linux finds how many files are in the directory

Order:

find ./ -type f | wc -l

Effect:

insert image description here

Analysis: find ./ -type f | wc -l

find: Find files in the specified directory./
: current directory
-type<file type>: only find files that match the specified file type;

f ordinary file
l symbolic link
d directory
c character device
b block device
s socket
p Fifo

| : filter pipe symbol
wc: count the number of bytes, words and lines of the file
-l: count the number of lines, or --lines: only display the number of columns;

Guess you like

Origin blog.csdn.net/qq_41694906/article/details/126466038