Subir archivos a "/"

This commit is contained in:
2025-06-16 20:44:12 +00:00
parent cf244fed05
commit af83e6053a
3 changed files with 187 additions and 0 deletions

View File

@ -0,0 +1,28 @@
#!/bin/sh
# Parametro1 - Ficheros de ultimos N dias
PATH_BCK=/sia/dat/backup
PATRON_FILES="-name SIASP010.FTAP080S0.HISOPVPMC*
-o -name SIASS010.FTAS080S0.HISOPVPSR*
-o -name SIASD010.FTAD080S0.HISOPEVPOS*
-o -name SIASA001.FTAA093S0.LOGMGO*
-o -name SIASA001.FTAG020S0.ICDGEN*"
DIAS=$1; : ${DIAS:="7"}
echo "----------------------------------------------------------------------------"
echo "Ficheros historicos sesiones guardados en $PATH_BCK - (ultimos $DIAS dias)"
echo "----------------------------------------------------------------------------"
/usr/bin/find $PATH_BCK -type f \( $PATRON_FILES \) -mtime -$DIAS -ls | /usr/bin/sort -k 8M,8 -k9| awk '{
dia=$9;
if (aux == dia) {
print
}
else {
print " "
print
}
aux=dia
}'