As an example response, I have the following in a shell script that is on the job scheduler to be run through QP2SHELL:

find /tmp/sq* -mtime +21 -exec rm {} \;

That deletes /tmp/sq* if it's older than 21 days. You could use mv instead of rm to move it somewhere else. You could probably do something clever with date calculations if you need to match a month specifically rather than "older than x days"

Command : CALL PGM(QP2SHELL) PARM('/QOpenSys/usr/bin/sh' '')

Other methods I tried failed due to the number of files found.
Sean Porterfield

-----Original Message-----
From: Adam Driver
Sent: Wednesday, May 21, 2014 14:44


Does anyone have any recommendations to move IFS files (a lot!) from one directory to another based on creation date. The idea is to omit the new location from the backup to reduce the backup time. We would want to schedule this say once a month. I'm open to scripting in QSH, although my Unix skills are basic, or a tool that might be out there.


This email is confidential, intended only for the named recipient(s) above and may contain information that is privileged. If you have received this message in error or are not the named recipient(s), please notify the sender immediately and delete this email message from your computer as any and all unauthorized distribution or use of this message is strictly prohibited. Thank you.

This thread ...


Return to Archive home page | Return to MIDRANGE.COM home page