Apologies if this is a repeated question, I am trying to search for a file in all the subdirectories in a given path. While doing so I also want to suppress any output messages, errors from the find
command, so I am using the following command:
find -L a/b/c/d/e -name file_name.xml -type f -print 2>/dev/null | xargs -l1 dirname
However, I am getting the following error:
Ambiguous output redirect.
If I remove 2>/dev/null
from my command I get the output message :
a/b/c/d/e/my_folder/file_name.xml
Kindly give some guidance how to solve
>
? – pLumo Jul 31 '20 at 07:02tcsh
issue, I don't use that. – pLumo Jul 31 '20 at 09:22