【问题标题】:Find directory name with wildcard or similar to "like"查找带有通配符或类似于“like”的目录名称
【发布时间】:2012-07-30 17:17:21
【问题描述】:

我正在使用以下命令来查找目录名称。

 find / -type d -name "ora10"

我的问题是,我不确定确切的目录名称是什么,所以我想找到类似于"ora10g""ora10client" 等的目录。

我如何使用 find 来做到这一点?

【问题讨论】:

  • 可能是"ora10*"?
  • @Coodey 这很可能是正确的,应该是一个答案。
  • @Coodey 你应该已经发布了这个答案......你首先做对了。

标签: unix directory


【解决方案1】:

查找支持通配符匹配,只需添加一个*

find / -type d -name "ora10*"

【讨论】:

  • 不加引号,记得转义星号:find / -type d -name ora10\* -print
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-01-04
  • 2018-07-17
  • 1970-01-01
  • 1970-01-01
  • 2021-06-23
相关资源
最近更新 更多