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



Sorry, I left out the -mtime, what I'd actually be doing is:
find /mydir/???? .fin.cis0000.staf.input01.????????.zip -mtime +30
-type f -exec rm {} \;')

Thus the use of find :)

Ah. Understood. Then you might find this more efficient:

find /mydir/???? .fin.cis0000.staf.input01.????????.zip \
-mtime +30 -type f | \
xargs rm

I formatted it that way for humans. It'll work that way, but probably best
in this case to put on one line. http://ss64.com/bash/xargs.html It's MUCH
more efficient and has the benefit of being easier to read and to type.

But, since folks don't typically use that name for directories, it
/effectively/ stops recursion.

This is a kludge, and easily broken. Avoid it.

Which I took to mean that find was seeing the *.java instead of the
shell expanding it...

But perhaps the shell _is_ expanding it, and since the resulting list
doesn't have any directories in in find doesn't recurse?

If you ever wonder what the shell may or may not expand use echo. For
example:
echo mydir/???? .fin.cis0000.staf.input01.????????.zip

What comes back to you is the result of shell expansion. After a few times
of this you will almost certainly have a grasp on how expansion works.

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"If we were logical, the future would be bleak indeed. But we are more than
logical. We are human beings, and we have faith, and we have hope, and we
can work."
-- Jacques Cousteau




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.