FG
💻 Software

Why can't -z be the last command-line option to be used with tar?

Fresh5 days ago
Mar 15, 20266050 views
Confidence Score0%
0%

Problem

Error Output

$ ls one.tar.gz
one.tar.gz
$ tar -xvfz one.tar.gz
tar: z: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
$ tar -xv…

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Why can't -z be the last command-line option to be used with tar?

Low Risk

The switch takes an argument (the filename). If appears after the then it is taken to be the filename. is the same as If you had done this: then would have been taken as the filename and you'd have gotten a similar error. This, however, would have w…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment