tar -v: Verbose Output (Usage & CI Errors)
tar -v prints each member name as tar processes it.
Verbose mode turns tar into a progress log. It is great for debugging a packaging step and noisy for a routine one, so use it deliberately in CI.
What it does
tar -v makes tar print the name of every file as it is created, extracted, or listed. Repeating it as -vv adds detail such as a long listing during extraction. The output goes to stderr during create so it does not corrupt a -f - stream piped on stdout.
Common usage
tar -cvf out.tar dir/ # log each file added
tar -xvf in.tar.gz # log each file extracted
tar -cvf out.tar dir/ 2> manifest.txt # capture the listOptions
| Flag | What it does |
|---|---|
| -v / --verbose | List each file processed |
| -vv | More detail (long listing on extract) |
| --checkpoint[=N] | Print a progress checkpoint every N records |
| --totals | Print total bytes written when done |
In CI
For large caches, -v can produce tens of thousands of log lines and slow the job. Prefer --totals for a one-line summary, or redirect verbose output to a file you only read when a step fails: tar -cvf cache.tar . 2> /tmp/tar.log.
Common errors in CI
Verbose output itself is not an error, but it hides the real one: when a job fails, scroll past the file list to the last lines for tar: Exiting with failure status due to previous errors. The actual cause (a Cannot stat or Permission denied line) appears just above that summary.