The simplest way to find a specific directory under the file name in line with regular

find . -name  '*.data'  -exec basename {} \;  |grep -E [0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}\.data |wc -l

The first step filtration display the names of all the suffix, and remove directory

The second step uses a regular filter all file names named in line with uuid

d

Guess you like

Origin www.cnblogs.com/jinanxiaolaohu/p/12024457.html