DUMPDIR=/root/downloads/plant/BackupsFierro
DUMPNAME=fierrodb
EXT=pgdump
CANTBCKPS=3

for F in `find ${DUMPDIR}/ -maxdepth 1 -name "${DUMPNAME}-[0-9][0-9][0-9][0-9]*.$EXT" | sort | head --lines=-$CANTBCKPS`; do
    rm -f $F
done
