home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.admin
- Path: sparky!uunet!boulder!colorado.edu!ejh
- From: ejh@khonshu.colorado.edu (Edward J. Hartnett)
- Subject: Re: problems with a find command (SUMMARY)
- In-Reply-To: mbarkah@slate.mines.colorado.edu's message of 23 Nov 92 17:56:01 GMT
- Message-ID: <EJH.92Nov23150526@khonshu.colorado.edu>
- Sender: news@colorado.edu (The Daily Planet)
- Nntp-Posting-Host: khonshu.colorado.edu
- Organization: CIRES, University of Colorado
- References: <EJH.92Nov23085733@khonshu.colorado.edu>
- <1992Nov23.175601.54551@slate.mines.colorado.edu>
- Date: 23 Nov 92 15:05:26
- Lines: 55
-
- In article <1992Nov23.175601.54551@slate.mines.colorado.edu> mbarkah@slate.mines.colorado.edu (Ade Barkah) writes:
-
- ejh@khonshu.colorado.edu (Edward J. Hartnett) writes:
- : I put a find command in my crontab file which I hoped would compress
- : files larger than 10 megabytes which haven't been accessed for 14
- : days. But here's what I got in my mail about it:
- : Your "cron" job
- :
- : /usr/bin/find / -size 1000000c -atime +14 -exec compress {}\;
- : ...
- : It looks like a good command to me! Can anyone help?
-
- You need a space between {} and \;. Do:
-
- /usr/bin/find / -size 10000000c -atime +14 -exec compress {} \;
-
- or
-
- /usr/bin/find / -size 10000000c -atime +14 -print | xargs compress
-
- I used the first one.
-
- Also make sure that the size is 10mb, not 1mb as you have it. You'd
- be in for a big surprise.
- Yes, I knew it was 1 MB, I just wrote 10 by mistake. Also, as someone
- here suggested, I changed it to +10000000c so that it would catch
- files greater than 1 MB too.
-
- Also, I'm not sure if running it recursive from the root directory
- is a good idea. You might just accidentally compress some systems
- file. In fact, it might not be a good idea doing anything of the
- sort.
- This is a good point and in fact, by the time I posted it I had
- already reconsidered. I now do two fnds, one for /data (a partition
- strictly for data) and /home/khonshu (user accounts - also with lots
- of data files). This way it won't go near any of my system files.
-
- An alternative would be to print out user files with the above
- specifications, then ask the user to either remove it or compress
- it if possible. Auto compress might just zap a poor user's datafile.
- (say, if he has something which updates the datafile monthly, and
- has been doing so for the last five years...) You be the judge.
- Yes, good idea, but in this case there are only three users, and I'm,
- by far, the most active, so it's no problem to just compress them.
-
-
- -Ade.
- --
- Internet : mbarkah@slate.mines.colorado.edu (NeXT Mailable)
- CompuServe: 74160,3404
- --
- Don't blame me, I voted against Amendment 2!
-
- Edward Hartnett ejh@khonshu.colorado.edu
-
-