sudo tar xuzf splunk-7.2.4-8a94541dcfac-Linux-x86_64.tgz -C /opt

I get the following message:

tar: You may not specify more than one '-Acdtrux', '--delete' or '--test-label' option Try 'tar --help' or 'tar --usage' for more information.

Note: I am on a google pixelbook running chromeos and using the Linux terminal.

Edit: I am following a tutorial for this and it worked perfectly for the person I am watching.

closed as off-topic by Rui F Ribeiro, Kusalananda, Jeff Schaller, telcoM, αғsнιη Feb 10 at 10:01

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Rui F Ribeiro, Kusalananda, Jeff Schaller, telcoM, αғsнιη
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Are you still sure that in the tutorial u worked instead of v? – Prvt_Yadv Feb 9 at 16:13
  • PRY is right, you are mistaking a v for a u. Youtube tutorial.... – Rui F Ribeiro Feb 9 at 16:15

You either extract (x) the archive or update (u) the archive: you can't do both at the same time.

Most likely you misread a v (for verbose) into a u.

So what you need would be:

sudo tar xvzf splunk-7.2.4-8a94541dcfac-Linux-x86_64.tgz -C /opt
  • You legend! It's as simple as that. Thank you so much. I will accept your answer in 5 mins as i cant do it before then! Thank you for your quick response. – Bradley Coupland Feb 9 at 16:05

x/-x/--extract is for extracting files out of the archive, u/-u/--update is to add modified files to the archive. It doesn't make sense to do both at the same time. The other ones mentioned (Acdtrux) are similarly incompatible.

Could it be that you were trying to extract files from the archive but misread v (verbose) as u? tar xvzf would make more sense.

  • Yes thank you it was! Cheers for the help. It was already answered above though – Bradley Coupland Feb 9 at 16:17
  • @BradleyCoupland, yeah, all three answers came within a minute of each other, I didn't see the others while writing. That happens. – ilkkachu Feb 9 at 16:20
  • Yeah no worries. Thank you anyway! I do appreciate it. – Bradley Coupland Feb 9 at 16:31

As the error says you can use only one option.

From man tar:

    -u, --update
          Append files which are newer than the corresponding copy in  the
          archive.   Arguments  have  the  same  meaning as with -c and -r

   -x, --extract, --get
          Extract files from an archive.  Arguments  are  optional.   When
          given,   they  specify  names  of  the  archive  members  to  be

So u option will append files (update) files while x will extract. As the other answers suggested, maybe you misspelled u instead of v (verbose).

So the final command will be like:

sudo tar xvzf splunk-7.2.4-8a94541dcfac-Linux-x86_64.tgz -C /opt

Not the answer you're looking for? Browse other questions tagged or ask your own question.