find isnt finding old articles?

find isnt finding old articles?

Post by Sys. Admin » Sat, 22 Apr 1995 04:00:00



I still have articles in /usr/spool/news/* that are older then 35 days :(
and the space is fuilling up did I enter the info wrong somehow? this is
running from userid news's crontab...

the more specific ones do seem to be working which is puzzleing me?

10 23 * * * find /usr/spool/news -type f -mtime +35 -print -exec rm {} \;
| Mail -s "Expire all news" usenet

this one doesnt work (it is really all on  1 line)

10 23 * * * find /usr/spool/news/alt/support/depression -type f -mtime
+15 -print -exec rm {} \; | Mail -s "Expire alt.support.depression" usenet

this one works fine  ?? (also all on 1 line)

there are articles that are more then 35 days old....
we get/post news thru suck/blow package, with Ed Carp's enhancements.

what can I do to

  (a) run 1 time (so its cleans up before the filesystem runs out of space)
  (b) get it run daily to contine housecleaning

thanks in advance

                                 a very *fuzzy*,
                                 fuzzy

 
 
 

find isnt finding old articles?

Post by Jonathan Kame » Mon, 24 Apr 1995 04:00:00



|> 10 23 * * * find /usr/spool/news -type f -mtime +35 -print -exec rm {} \;
|> | Mail -s "Expire all news" usenet
|>
|> this one doesnt work (it is really all on  1 line)

Perhaps it doesn't work because /usr/spool/news is a symbolic link?  Try
changing "/usr/spool/news" in the command above to "/usr/spool/news/."
(including the final period!).

 
 
 

1. Finding old directories with find -mtime

Hi all,

No flames please. This is not as easy as it looks...

The goal: The find all directories which are say over 30 days old and
print them...with a view to alerting users and possibly archiving
them... easy you say....

find . -type d -mtime +30 -prune -exec du -sk {} \\;|sort -nr |

This even nicely gives the size... but it doesn't do exactly what I
want, because there could be sub-dirs that might be very active. If I
leave out the prune I get lots more dirs, but I still don't know if
any one is really valid. I could add a depth option but that doesn't
help because it will still print out invalid dirs, just in a different
order...

The only solutions I see are.... find all dirs younger than 30 and
compare with the older ones and do lots of manipulating...or  make
some kind of recusive script to run under -exec in the find command.
Neither very elegant...

Example:
              |-->2 (35 days)-->6 (2 days)
1(100days)--->|-->3 (15 days)-->5 (35 days)
              |-->4 (40 days)    

what should be returned is
/1/4
/1/3/5
and nothing else... but find as outlined will get
/1
/1/2
/1/3/5
/1/4

This should be something lots of people would want to do. Am I missing
someting obvious?

John McDonnell.
Cork, Ireland.

2. get an unsigned number in bash2?

3. Need to find vi command to remove ^H from command man find > find.txt

4. the definition of dirent

5. find without the "find: cannot read dir /usr/lost+found: Permission denied"

6. Problem with harden_suse perl script.

7. find, find, find

8. Apache, linux and libdb.so.3

9. TRN can't find any articles!

10. finding article - "Screen Updating and Cursor Movement..."

11. How to find this article from SUN web?

12. How to find some articles about the history of POSIX

13. where to find Nov. Linux Journal article?