× 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.



Aaron,

You can do this with QShell. Here's an example:

find -x /somedir -type f -name *.pdf -mtime +180 -exec rm {};

What this does is find anyfile in directory /somedir that ends in .pdf and was 
created at least 180 days ago. When it finds a match on the file, it executes 
the rm command passing in the file name (which is represented by {}).

I don't recurse sub-directories when I run a similar command, but you should be 
able to do that by adding the R flag to the find command (-xR instead of -x).

WARNING!!! If you run this starting at '/', you could do some serious harm to 
your system. To the best of my knowledge, it will happily churn through every 
directory in the IFS including the ones that mount remote file systems (which 
could make you a very popular person if you delete too much).

Matt

-----Original Message-----
From: Bartell, Aaron L. (TC) [mailto:ALBartell@xxxxxxxxxxxxxx]
Sent: Thursday, September 04, 2003 4:47 PM
To: 'RPG programming on the AS400 / iSeries'
Subject: Purge IFS files tool


Does anyone have a tool that purges files out of the IFS based on date
created, extension, and file name?

I am finding that I have quite the mess in the IFS (thousands of files) and
I need an intuitive way to clean them up programmatically.

Thanks,
Aaron Bartell
_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.