// plain
The tar xvf
command is used to extract files from a tar archive. This command takes the archive file as an argument, and extracts the contents of the archive into the current directory.
tar xvf archive.tar
This command will extract all of the files from the archive.tar file into the current directory.
The parts of the command are as follows:
tar
: The tar command is used to create and manipulate tar archives.x
: Thex
flag indicates that the tar command should extract the contents of the archive.v
: Thev
flag indicates that the tar command should be verbose, and output the names of the files as they are extracted.f
: Thef
flag indicates that the tar command should read the archive from a file.
onelinerhub: How do I use the Unix tar xvf command to extract files?