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.
特定のディレクトリから文字列「tomcat」を含むすべてのパスを見つけるにはどうすればよいですか? つまり、tomcat1、tomcat2、tomcat3 などを含むものを検索したいですか?
ありがとう。
試す
find . -iname tomcat\*
ドットを検索するディレクトリに置き換えるか、検索するディレクトリにcdします。
ディレクトリ名のみを検索したい場合は、試してください
find . -type d -iname tomcat\*
検索を使用:
find / -name "tomcat*"
試してくださいgrep:
grep
grep -r "tomcat" dir