gpt4 book ai didi

linux - Grep 查找主目录下的特定目录

转载 作者:太空宇宙 更新时间:2023-11-04 10:48:04 24 4
gpt4 key购买 nike

假设我有以下目录结构:

main_dir
- subdir
- fabricators
- other directories
- subdir
- fabricators
- other directories ..
- subdir
- fabricators
- other directories ..

现在如何从主目录中只搜索目录 fabricator 而排除其他目录?

最佳答案

使用 shell 通配符:

grep searchstring main_dir/*/fabricators/*

关于linux - Grep 查找主目录下的特定目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32218498/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com