Embracing the Messiness in Search of Epic Solutions

tar: Exiting with failure status due to previous errors

Posted

in

PROBLEM

When creating a compressed archive file:-

tar -zcvf apps.tar.gz apps

… the following error is thrown:-

tar: Exiting with failure status due to previous errors

SOLUTION

This error usually occurs due to permission issues.

However, the error messages are hidden beneath gobs of output activated by the verbose flag.

To fix this, reduce the output by removing the -v flag:-

tar -zcf apps.tar.gz apps

… and now, the error message appears:-

tar: apps/apps.key.enc: Cannot open: Permission denied
tar: Exiting with failure status due to previous errors

Once the problem is fixed, the command will run successfully.

Tags:

Comments

One response to “tar: Exiting with failure status due to previous errors”

  1. uniquewebsites Avatar

    Another option is to add `> /dev/null` to the command and it will only output errors…

Leave a Reply