diff --git a/osx/find.md b/osx/find.md new file mode 100644 index 000000000..81e641e01 --- /dev/null +++ b/osx/find.md @@ -0,0 +1,15 @@ +# find + +> Find files under the current directory tree, recursively + +- find files by extension + +`find {{root_path}} -name {{'*.py'}}` + +- run a command for each file + +`find {{root_path}} -name {{'*.py'}} -exec {{wc -l {}}} \;` + +- find files modified since a certain time + +`find {{root_path}} -name {{'*.py'}} -mtime {{-1d}}`