Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在适合此配置文件的 linux 服务器上找到所有文件:
sfvhebviweuiber9.html sfvhebviweuiber11.html jdjhwn2jjsfy2q10.html
10-15第一个字符在哪里a-z,然后是[1-15],然后.html。
10-15
a-z
[1-15]
.html
我如何使用locate(或任何其他方法)查找适合此配置文件的所有文件?
locate
差异基本上是第一个10-15字符,因为它们由随机字母字符组成。
我不太明白您描述中的“[1-15]”部分,但我认为这样做可以。您可以在正则表达式中细化.*部分
.*
locate -r '[a-z]\{10,15\}.*html'