Last change
on this file since 3762 was 3672, checked in by Bruno Cornec, 7 years ago |
Manages mageia-docker upper script and cleanup
|
File size:
304 bytes
|
Rev | Line | |
---|
[3672] | 1 | #!/bin/bash
|
---|
| 2 | #
|
---|
| 3 | # Cleanup of ftp are for mageia-docker content
|
---|
| 4 | #
|
---|
| 5 | # This is were we store the files
|
---|
| 6 | cd ~ftp/mageia-docker
|
---|
| 7 |
|
---|
| 8 | # We want to keep that many files
|
---|
| 9 | KEEP=5
|
---|
| 10 |
|
---|
| 11 | # for each distro...
|
---|
| 12 | for 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
|
---|
| 18 | done
|
---|
Note:
See
TracBrowser
for help on using the repository browser.