On Tue, May 12, 2020 at 4:50 PM <Francis.Montagnac@xxxxxxxx> wrote: > > > Hi > > On Tue, 12 May 2020 16:31:44 -0400 bruce wrote: > > find /home -type f ! -path "*/csvn/*" ! -path "*/Android*/*" -name > > "*.*" -print0 | xargs -0 grep 'repos' | xargs -0 grep 'github' > > > So, I start at the top of the dir, I skip a few of the child dirs, and > > I want to find files containing "repos" and "github". > > Try that: > > find /home -type f \ > ! -path "*/csvn/*" \ > ! -path "*/Android*/*" \ > -name "*.*" -print0 \ > | xargs -0 grep -lZ 'repos' \ > | xargs -0 grep -l 'github' > > That should output the pathnames of the matching files. > > You were feeding the matching lines to the second grep. > > > The above cmd returns the err > > xargs: argument line too long > > Surprising. Hey Francis!! much thanks.. so the grep "iZ" attribute was what was required. I now get the list of files. thanks! _______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx