我希望这是一个有趣的问题..我想找到一个包含所有给定文件的目录..直到现在我的做法如下
在Unix中查找多个文件...
参考链接:http://www.unix.com/unix-for-dummies-questions-and-answers/107488-find-files-display-only-directory-list-containing-those-files.html 如何创建一个命令,以获得包含所有给定文件的目录...(这些文件必须仅存在于给定目录中而不是子目录中...并且必须存在于列表中提供的所有文件)
想要搜索 WordPress 主题目录。
在Unix中查找多个文件...
find . -type f \( -name "*cache" -o -name "*xml" -o -name "*html" \)
参考 : http://alvinalexander.com/linux-unix/linux-find-multiple-filenames-patterns-command-example
查找只包含给定文件的目录...
find . -type f -name '*.pdf' |sed 's#\(.*\)/.*#\1#' |sort -u
参考链接:http://www.unix.com/unix-for-dummies-questions-and-answers/107488-find-files-display-only-directory-list-containing-those-files.html 如何创建一个命令,以获得包含所有给定文件的目录...(这些文件必须仅存在于给定目录中而不是子目录中...并且必须存在于列表中提供的所有文件)
想要搜索 WordPress 主题目录。