ls -ltdr appbak_20 2devnull wc -l
The command ls -ltdr appbak_20* 2>/dev/null| wc -l will count the number of files (or directories) that start with "appbak_20" in the current directory and its subdirectories. It will exclude any error messages by redirecting stderr to /dev/null. The count will be displayed as the output of the command.
原文地址: https://www.cveoy.top/t/topic/hIeS 著作权归作者所有。请勿转载和采集!