Way to filter files in IFS?

435 pts.
Tags:
AS/400
i5
IBM iSeries
OS/400
Security
Michael recently wrote Search400.com with this question: "Every day we have hundreds of very small 1K to 100K files written to a directory (JDEB7333) on our IFS. All the files have the same extension of .log. Is there a native command or a utility (free or subscription) that you are aware of that will search the entire JDEB7333 directory for files with a .log extension for a keyword, such as "error" or "failed"?" Think you can help? Michelle Davidson Editor Search400.com mdavidson@techtarget.com

Answer Wiki

Thanks. We'll let you know when a new response is added.

I think you can use the unix command ‘grep’ from the Qshell.
I’m not an expert in unix-like shells, but the following commands could help you:

‘STRQSH’ to enter Qshell
‘grep “error” /JDEB7333/*.log ‘

this command will display each line containing “error”, and output can be redirected to a file.

Regards

Laurent

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Fhabibi
    or just to look for a string within the IFS file. Try this in qsh. cat *.log |grep failed
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following