[英]list all files in directory and subdirectories in linux with specific pattern filename
[英]Get all the files that match pattern in file name anywhere in unix/linux directories/subdirectories
我有100个主目录,其中每个主目录中都有多个子目录,每个子目录中都有几个子目录。 我想在所有这些目录/子目录中的任何位置获取与文件名mypattern
中的pattern匹配的所有文件。 有办法吗?
find <root directory> -name *pattern*
例如: find . -name *nix*
find . -name *nix*
当然。 不过,这确实不是编程问题。
find . -regex '.*regex_here.*'
看看man find
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.