Multiple choice technology operating systems

Give the command to archive using tar?

  1. tar -cvf "source file" "destination.tar"

  2. tar -xvf "source file"

  3. tar -cvf "source file"

  4. tar -dvf

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The tar command with -c flag creates archives, -v enables verbose mode, and -f specifies the filename. The correct syntax is 'tar -cvf destination.tar sourcefile' where the destination comes before the source. Option C has the right flags and command structure for creating an archive. Options A reverses the order, B extracts files, and D uses a non-existent -d flag.