Siempre es molesto ver el mensaje de sistema operativo "The parameter or environment lists are too long.". Con el comando que se detalla a continuación se puede eliminar todos los archivos del directorio poco a poco el sistema operativo lo va resolviendo.
bash-4.2$ find /logdir/path/ -name *.aud -mtime +7 -exec rm {} \;
bash: /usr/bin/find: The parameter or environment lists are too long.
Solución
bash-4.2$ find /logdir/path/ -name "*.aud" -type f -exec rm {} \;
O
bash-4.2$ find /logdir/path/ -name *.aud -mtime +7 -exec rm {} \;
bash: /usr/bin/find: The parameter or environment lists are too long.
Solución
bash-4.2$ find /logdir/path/ -name "*.aud" -type f -exec rm {} \;
O
bash-4.2$ find /logdir/path/ -name *.aud -type f -print | xargs rm
Comentarios
Publicar un comentario