Trying to get a string from a location which has lots of file. Getting error as argument list too long
, have tired xargs
but there's no support for these advanced keywords
grep 'hello' /file/collection/*/logs/*.log > ~/hello
Trying to get a string from a location which has lots of file. Getting error as argument list too long
, have tired xargs
but there's no support for these advanced keywords
grep 'hello' /file/collection/*/logs/*.log > ~/hello
Try this
$ find /file/collection/*/logs/ -name "*.log" -type f -maxdepth 1 | xargs grep hello