On 25 Jun 2006, at 19:13 , Peter N Lewis wrote:
On 21 Jun 2006, at 21:18 , Peter N Lewis wrote:
For future reference, why not turn on BBEdit's backup files.
Sure, you end up with a folder with 40,000 files taking up
2.5Gig, but it would have saved you this time...
10 5 1 * * find $HOME/Documents/.backups/ -atime +60 -print0 |
xargs -0 rm
(at 05:10 on the first of the month, find all the files in the
backup directory that haven't been accessed in 60 days, print0
them (to avoid problems with spaces) and toss them at rm)
BTW, watch out for using access time. It my mucking around with my
script, I found that many files had exactly the same access time.
I changed over to modified time and they were all different, and
much larger (many files that had been created a year ago had (often
identical) access times in the last couple months). I suspect that
could be Spotlight, or running a complete backup, or some other
process that accesses all files.
In this case, its no big deal, it would just leave some extra
backup files to be deleted next month (although if you did a
complete backup once a month it might render the cron job
useless). In other cases, this unexpected change of access time
could cause serious problems.
That's interesting. I found various problems when I just ran the
script using modified time...
I originally used access time because there are times when I open a
file in the backup directory (to see a previous version of a file I
am editing) but do not actually make changes. I want those 'hits' to
count.
But, as you said, spotlight might have changed all that.
Maybe I should add the backup directory to the exclusion list? Or
does spotlight ignore files and directories starting with a '.'? I
seem to recall something about that.
(My backups directory is ~/Documents/.backups/)
I'll monitor the directory at the end of July and see what happens
(there are only June files in it now as the May backups are... or
where, on the previous machine.)
--
Eyes the shady night has shut/Cannot see the record cut
And silence sounds no worse than cheers/After earth has stopped the
ears.
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>