Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

migrated from serverfault.com Jul 13 '11 at 4:06

This question came from our site for professional system and network administrators.

    
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 –  PeanutsMonkey 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
add comment

1 Answer

up vote 1 down vote accepted

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
1.txt
2.txt
3.txt
Verify 1.txt
Verify 2.txt
Verify 3.txt
share|improve this answer
    
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 –  PeanutsMonkey 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 –  Nathan Powell 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. –  PeanutsMonkey 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. –  Nathan Powell 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. –  PeanutsMonkey Jul 13 '11 at 2:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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