How can I ignore specific folders when searching with grep -r "llamacpp" .?
- User
How can I ignore specific folders when searching with
grep -r "llamacpp" .? Assistant
You can use the
--exclude-diroption with grep to ignore specific folders:bashgrep -r --exclude-dir=folder_name "llamacpp" .For multiple folders:
bashgrep -r --exclude-dir={folder1,folder2,folder3} "llamacpp" .Or exclude patterns:
bashgrep -r --exclude-dir="*.git" --exclude-dir="node_modules" "llamacpp" .Alternative approach using
find:bashfind . -type f -not -path "./folder_to_ignore/*" -not -path "./another_folder/*" | xargs grep "llamacpp"
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.