MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » May 2014

RE: Move IFS files based on date



fixed

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' 'myscript.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

Hi,

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.





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

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact