Another version that does a similar thing:

find /path/to/repo -type d -mtime +15 -name '*SNAPSHOT*' -exec rm -fr {} \;

This will delete any snapshots older than 15 days.

Jim


On 10/18/07, Brett Porter <[EMAIL PROTECTED]> wrote:
>
> I use Archiva on my own repository to clean up snaphots - it'll remove
> anything older than X days, Y builds, or that has already been
> released (if configured to do so).
>
> I also have a script I've been meaning to look at and put on the wiki
> - will try and do that today.
>
> - Brett
>
> On 19/10/2007, Wayne Fay <[EMAIL PROTECTED]> wrote:
> > Not that I've seen, but when you write it later today, maybe you won't
> > mind contributing it back via this list and/or the Wiki for the
> > benefit of future users? ;-)
> >
> > It should be a simple script -- for all directories, if this is a
> > snapshot version, find latest and delete (or move) the rest. Then run
> > it via cron.
> >
> > Wayne
> >
> > On 10/18/07, Thomas Jackson <[EMAIL PROTECTED]> wrote:
> > > We have an internal repository and are constantly deploying snapshots
> > > throughout the day.  We want to clean these nightly(to preserve space)
> > > and I was wondering if anyone had a shell script already written that
> > > will cleanup snapshots nightly?
> > >
> > > Thanks
> > > Thomas Jackson
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Brett Porter
> Blog: http://www.devzuz.org/blogs/bporter/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to