From b7040ec87ad0ee9b1511bc3f1464dd69bcfb44a8 Mon Sep 17 00:00:00 2001 From: Pranav Raja Date: Wed, 11 Dec 2013 21:23:59 +1100 Subject: [PATCH] Add doc for find(1) --- osx/find.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 osx/find.md 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}}`