× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thank you for that. I often respond to off list requests by re-including the list so that everyone sees the answer. That's the power of the list!!

- Larry "DrFranken" Bolhuis

www.Frankeni.com
www.iDevCloud.com - Personal Development IBM i timeshare service.
www.iInTheCloud.com - Commercial IBM i Cloud Hosting.

On 12/6/2017 12:14 PM, Justin Taylor wrote:
I received an off-list request regarding writing and compiling my script.

The script itself is just a plain text file, in my case called purgeTmp.sh. I created it using RDi, but I'm sure you could also create it using 5250 or iNav. The file itself only contains a single line:
find /tmp/ -mmin +5 | xargs rm

The script doesn't have to be compiled, it's interpreted at runtime. It could be ran interactively thru a PASE shell, but I need it from CL. Here's that command (this assumes the script file is in your current directory, otherwise the second parm would need to be a fully-qualified path):
CALL PGM(QP2SHELL) PARM('/QOpenSys/bin/sh' 'purgeTmp.sh')






-----Original Message-----
From: Justin Taylor
Sent: Tuesday, December 05, 2017 11:21 AM
To: 'Midrange Systems Technical Discussion' <midrange-l@xxxxxxxxxxxx>
Subject: RE: Delete IFS files > x min old

That worked.

I made a script:
find /tmp/ -mmin +5 | xargs rm

And then used QP2SHELL to execute it:
CALL PGM(QP2SHELL) PARM('/QOpenSys/bin/sh' 'purgeTmp.sh')


Thanks guys!



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.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 on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.