source: MondoRescue/branches/3.3/ansible/roles/mageia-docker/files/clean-ftp@ 3672

Last change on this file since 3672 was 3672, checked in by Bruno Cornec, 7 years ago

Manages mageia-docker upper script and cleanup

File size: 304 bytes
Line 
1#!/bin/bash
2#
3# Cleanup of ftp are for mageia-docker content
4#
5# This is were we store the files
6cd ~ftp/mageia-docker
7
8# We want to keep that many files
9KEEP=5
10
11# for each distro...
12for v in *; do
13 c=`ls $v | wc -l`
14 c2=$(($c - $KEEP))
15 if [ $c2 -gt 0 ]; then
16 rm -f `ls -tr $v/* | head -$c2`
17 fi
18done
Note: See TracBrowser for help on using the repository browser.