Linux – tar Exiting with failure…

command-line-interfacelinuxshelltar

i'm untaring with this command tar -pxvzf filename.tar.gz an everything seems to be going fine but, it unexpectedly exits with the error below. Is there a reason why I'm receive this error and / or prevent it?

tar: Exiting with failure status due to previous errors

Followed the suggestion from people who replied and removed the -v. this is the output errors (see below). This is a backup of a joomla cms site. Any idea what would cause these errors? The only thing I could thing of is the cache and tmp folders might be causing it with the weird characters that it may have

tar: Archive contains `nsion.pd' where numeric mode_t value expected
tar: Archive contains `Party.pd' where numeric mode_t value expected
tar: Archive contains `manent C' where numeric mode_t value expected
tar: Archive contains `ial Circ' where numeric mode_t value expected
tar: Archive contains `pdf0444' where numeric mode_t value expected
tar: Archive contains `pring 20' where numeric mode_t value expected
tar: Archive contains `.pdf444' where numeric mode_t value expected
tar: Archive contains `pdf0444' where numeric mode_t value expected
tar: Archive contains `up from ' where numeric mode_t value expected
tar: Archive contains `ting.pdf' where numeric mode_t value expected
tar: Archive contains `on.pdf4' where numeric mode_t value expected
tar: Archive contains `f100444' where numeric mode_t value expected
tar: Archive contains `ptions t' where numeric mode_t value expected
tar: Archive contains `f100444' where numeric mode_t value expected
tar: Archive contains `pdf0444' where numeric mode_t value expected
tar: Archive contains `f100444' where numeric mode_t value expected
tar: Archive contains `ter.pdf' where numeric mode_t value expected
tar: Archive contains `ted.pdf' where numeric mode_t value expected
tar: Archive contains `df00444' where numeric mode_t value expected
tar: Archive contains `Inc..pdf' where numeric mode_t value expected
tar: Archive contains `d.pdf44' where numeric mode_t value expected
tar: Archive contains `Network.' where numeric mode_t value expected
tar: Archive contains `df00444' where numeric mode_t value expected
tar: Archive contains `rship Aw' where numeric mode_t value expected
tar: Archive contains `.pdf444' where numeric mode_t value expected
tar: Archive contains `ition.pd' where numeric mode_t value expected
tar: Archive contains `df00444' where numeric mode_t value expected
tar: Archive contains `9.pdf44' where numeric mode_t value expected
tar: Archive contains `1.pdf4' where numeric mode_t value expected
tar: Exiting with failure status due to previous errors

Best Answer

Your command will invoke tar which will invoke gunzip to uncompress the file first. You can use two commands to check for possible errors like file corruption as follows:

$ gunzip filename.tar.gz

The above command will produce the file filename.tar. Then, you can use:

$ tar -pxvf filename.tar

This should help you in debugging the problem. You can also remove the -v from the command to disable files listing which may help you to focus on the error messages only.