From ccf3eddba00b4f1e5c6f6852fd48c4a43043f6c9 Mon Sep 17 00:00:00 2001 From: ImmortalPC Date: Thu, 5 Dec 2013 17:24:29 +0100 Subject: [PATCH] [Change] Add "not this dir" into find examples --- cheatsheets/find | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cheatsheets/find b/cheatsheets/find index 00c6c86..c6126b3 100644 --- a/cheatsheets/find +++ b/cheatsheets/find @@ -36,3 +36,6 @@ find . -type d -empty -exec rmdir {} \; # To search for directories named build at a max depth of 2 directories find . -maxdepth 2 -name build -type d + +# To search all files who are not in .git directory +find . ! -iwholename '*.git*' -type f