home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / admin / 6339 < prev    next >
Encoding:
Internet Message Format  |  1992-11-23  |  1.7 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!destroyer!ncar!vexcel!copper!slate!mbarkah
  2. From: mbarkah@slate.mines.colorado.edu (Ade Barkah)
  3. Newsgroups: comp.unix.admin
  4. Subject: Re: problems with a find command
  5. Message-ID: <1992Nov23.175601.54551@slate.mines.colorado.edu>
  6. Date: 23 Nov 92 17:56:01 GMT
  7. References: <EJH.92Nov23085733@khonshu.colorado.edu>
  8. Organization: Colorado School of Mines
  9. Lines: 37
  10.  
  11. ejh@khonshu.colorado.edu (Edward J. Hartnett) writes:
  12. : I put a find command in my crontab file which I hoped would compress
  13. : files larger than 10 megabytes which haven't been accessed for 14
  14. : days. But here's what I got in my mail about it:
  15. : Your "cron" job
  16. : /usr/bin/find / -size 1000000c -atime +14 -exec compress {}\;
  17. : ...
  18. : It looks like a good command to me! Can anyone help?
  19.  
  20. You need a space between {} and \;. Do:
  21.  
  22. /usr/bin/find / -size 10000000c -atime +14 -exec compress {} \;
  23.  
  24. or
  25.  
  26. /usr/bin/find / -size 10000000c -atime +14 -print | xargs compress
  27.  
  28. Also make sure that the size is 10mb, not 1mb as you have it. You'd
  29. be in for a big surprise.
  30.  
  31. Also, I'm not sure if running it recursive from the root directory
  32. is a good idea. You might just accidentally compress some systems
  33. file. In fact, it might not be a good idea doing anything of the
  34. sort.
  35.  
  36. An alternative would be to print out user files with the above
  37. specifications, then ask the user to either remove it or compress
  38. it if possible. Auto compress might just zap a poor user's datafile.
  39. (say, if he has something which updates the datafile monthly, and
  40. has been doing so for the last five years...) You be the judge.
  41.  
  42.  
  43. -Ade.
  44. -- 
  45. Internet  : mbarkah@slate.mines.colorado.edu    (NeXT Mailable)
  46. CompuServe: 74160,3404
  47.