To create an archive named abc.tar consisting of two files, file01

to-create-an-archive-named-abc-tar-consisting-of-two-files-file01

To create an archive named abc.tar consisting of two files,  file01 and file02, which of the following command will be used?

A. tar -cvf  abc.tar  file01  file02

B. tar -cvf  file01  file02  abc.tar

C. tar -cv  abc.tar  file01  file02

D. tar -c  abc.tar  file01  file02

This question was addressed to me in an internship interview.

This key question is from Compressing and Archiving Files in chapter Handling Ordinary Files of Unix

Correct choice is B. tar -cvf  file01  file02  abc.tar

To explain I would say: To create an archive -c option is used, -v is used to display the progress while tar works while -f is used to specify the name of the archive. All these options can be combined together as (-cvf).