enter image description here

I am new to the world of linux and when attempting to verify a tar archive I am displayed the following error. When running the command tar cvfW archivename.tar filename directoryname does not yield any errors.

  • Okay, after you posting this phrase five times (at least) we now are all aware that you're "new to the world of linux". :)
    – EEAA
    Jul 13 '11 at 1:59
  • @ErikA - Just like to point out the questions are from a linux newbie Jul 13 '11 at 2:17
  • Understood - that doesn't really matter. Post your question - it'll get answered by and large regardless of the skill level of the OP.
    – EEAA
    Jul 13 '11 at 2:23
  • I should add that you ought to make sure that you're adhering to the FAQ with regards to what is on-topic and what is not.
    – EEAA
    Jul 13 '11 at 2:27

You have the options in the wrong order. f is for file, so it has to be last the way you are doing it.

tar cvWf tarball.tar *.txt

Create, Verbose, Verify, File

[powellnj@insomnia ~]$ touch {1,2,3}.txt
[powellnj@insomnia ~]$ tar cvWf tarball.tar *.txt
Verify 1.txt
Verify 2.txt
Verify 3.txt
  • Thanks. I tried that it doesn't work either if I am using the -t argument/switch i.e. tar tvWf archivename.tar. Also I am following the guide at thegeekstuff.com/2010/04/unix-tar-command-examples Jul 13 '11 at 2:16
  • The W only works during creation. 'tar tvf tarball.tar' will do what you want. man tar: -W, --verify attempt to verify the archive after writing it Jul 13 '11 at 2:19
  • So the meaning of after writing it is only when using -c? Am surprised though that the article suggest I can use it when -t. Jul 13 '11 at 2:22
  • It doesn't say what implementation of tar they are using. tar differs on different platforms. If you want to learn to use tar on Linux, you need to find a tutorial that is GNU specific. Jul 13 '11 at 2:25
  • I did not know that. How do I check if the version of tar I am using is GNU specific. Jul 13 '11 at 2:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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