瀏覽代碼

Update find.md

Bo-Yi Wu 9 年之前
父節點
當前提交
ed380d1a67
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      pages/common/find.md

+ 4 - 0
pages/common/find.md

@@ -6,6 +6,10 @@
 
 `find {{root_path}} -name {{'*.py'}}`
 
+- run a command for each file, use {} within the command to access the filename
+
+`find {{root_path}} -name {{'*.py'}} -exec {{wc -l {} }}\;`
+
 - find files modified since a certain time
 
 `find {{root_path}} -name {{'*.py'}} -mtime {{-1d}}`