# rm-rf.es

Comprobar la integridad de ficheros tar, gz, rar, zip

De nada sirve tener un sistema de backups o comprimir y empaquetar ficheros con información sensible si no tenemos la seguridad de que el archivo de respaldo es 100% fiable. Hoy vamos a ver como verificar la integridad de ficheros comprimidos y empaquetados desde GNU/Linux.

Ficheros .gz

gunzip -t fichero.gz
gunzip --test fichero.gz
gzip -t  fichero.gz
gzip --test fichero.gz

Ficheros .tar

tar tf fichero.tar

Podemos realizar la verificación en el momento que creamos el fichero con el parámetro W:

tar cvfW fichero.tar directorio/

Ficheros .tar.gz

gunzip -c fichero.tar.gz | tar tf -

Ficheros .tar.bz2

bzip2 -tvv fichero.tar.bz2

Ficheros .zip

unzip -t fichero.zip

Ficheros .rar

unrar t fichero.rar
Salir de la versión móvil