diff --git a/pages/common/find.md b/pages/common/find.md index a4ff94762a..e60b86a5ad 100644 --- a/pages/common/find.md +++ b/pages/common/find.md @@ -1,11 +1,15 @@ # find -> Find files under the given directory tree, recursively. +> Find files or directories under the given directory tree, recursively. - Find files by extension: `find {{root_path}} -name '{{*.ext}}'` +- Find directories matching a given name: + +`find {{root_path}} -type d -name {{*lib*}}` + - Find files matching path pattern: `find {{root_path}} -path '{{**/lib/**/*.ext}}'` @@ -29,7 +33,3 @@ - Find files matching a given pattern, while excluding specific paths: `find {{root_path}} -name '{{*.py}}' -not -path '{{*/site-packages/*}}'` - -- Find directories matching name: - -`find {{root_path}} -type d -name 'httpdocs'`