質問
このプロファイルに合ったLinuxサーバー上のすべてのファイルを見つけようとしています。
sfvhebviweber9.html
sfvhebviweber11.html
jdjhwn2jjsfy2q10.html最初の
10-15
文字がa-z
の後に[1-15]
の後に.html
。このプロファイルに合ったすべてのファイルを見つけるために
locate
(または他の方法)を使用する方法はありますか?違いは基本的にはランダムなアルファベット文字で構成されているため、最初の
10-15
文字です。
解決
I don't quite get the "[1-15]" part of your description, but I think this would do. You can refine the .*
part in the regex
locate -r '[a-z]\{10,15\}.*html'
所属していません StackOverflow