Originally Posted by KClaisse
I didn't know grep could do multiple files. Thanks!
EDIT: Hmm, it seems grep isn't up to the task
grep -R sometext /opt/srcds_l/srcds/cstrike/logs/*.log
-bash: /bin/grep: Argument list too long
I don't think grep can handle the magnitude of this job.
hmm, those logs must have strange names, use this instead
find /opt/srcds_l/srcds/cstrike/logs/ -name '*.log' | xargs grep sometext
if, you don't want to recurse subdirectories use -maxdepth 1
find /opt/srcds_l/srcds/cstrike/logs/ -maxdepth 1 -name '*.log' | xargs grep sometext
if any of the filenames have spaces/newlines or special characters then you need to use -print0
find /opt/srcds_l/srcds/cstrike/logs/ -name '*.log' -print0 | xargs -0 grep sometext
EDIT: also, try grep without the -R option, that is just to recurse subdirectories, which you may not want