A memo on how to remove output containing the string “No such file or directory” using the “fgrep -v” command in Bash on the Linux command line.
find . -type f | xargs grep "PIX-DT300" |& fgrep -v "そのようなファイルやディレクトリはありません" |& fgrep -v "No such file or directory"
Like this. Supports both English and Japanese.
find . -type f | xargs grep "PIX-DT300" |& fgrep -v -E '(No such file or directory|そのようなファイルやディレクトリはありません)'
I tried to do it with regular expressions, but this gave a grep: conflicting matchers specified error and didn’t work, so I think the best way is to chain |& multiple times.