From d711fa89e534b28efa8c95139b852c1210b20c5c Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 26 Jan 2015 09:41:45 +0300 Subject: [PATCH] bin/find_*: first check names Name check doesn't require addition stat call. --- bin/find_home_grep.sh | 2 +- bin/find_sources.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/find_home_grep.sh b/bin/find_home_grep.sh index dcca1ca..bbf4dc1 100755 --- a/bin/find_home_grep.sh +++ b/bin/find_home_grep.sh @@ -1,4 +1,4 @@ #! /bin/sh cd "$HOME" && exec cgmem_nice 100 \ -find . \( -type d \( -name CVS -o -name .git -o -name .hg -o -name .svn -o -path ./.cache/chromium/\* -o -path ./.cache/mozilla/\* -o -path ./Internet/WWW/htdocs/doc/\* -o -path ./archive/STORE/\* -o -path ./current/Bregis/nobackup/\* -o -path ./media/\* -o -path ./mnt/\*\* \) -prune \) -o -type f -exec grep -I "$@" '{}' \+ 2>/dev/null +find . \( \( -name CVS -o -name .git -o -name .hg -o -name .svn -o -path ./.cache/chromium/\* -o -path ./.cache/mozilla/\* -o -path ./Internet/WWW/htdocs/doc/\* -o -path ./archive/STORE/\* -o -path ./current/Bregis/nobackup/\* -o -path ./media/\* -o -path ./mnt/\*\* \) -type d -prune \) -o -type f -exec grep -I "$@" '{}' \+ 2>/dev/null diff --git a/bin/find_sources.sh b/bin/find_sources.sh index c3111e6..e2ecbea 100755 --- a/bin/find_sources.sh +++ b/bin/find_sources.sh @@ -1,4 +1,4 @@ #! /bin/sh exec cgmem_nice 100 \ -find . \( -type d \( -name CVS -o -name .git -o -name .hg -o -name .svn \) -prune \) -o -type f -print +find . \( \( -name CVS -o -name .git -o -name .hg -o -name .svn \) -type d -prune \) -o -type f -print -- 2.39.2