Skip to main content

14.8) Extracting files from a tar file


So:
mkdir check
to make the directory and
mv files.tar check
to transfer the file and then go into the directory by:
cd check
Now extract using:
tar –xvf files.tar
You will see the test directory appear if you use ls. Go into the test directory and check if the files are there, they should be. Watch the videos for hands on examples of this.


This shows the tar command in operation in which it is used to tar up a directory including five files and it is then extracted in a different location in my directory and the tree structure and files are all extracted from the tar file.
 
Note:
The -xvf indicate x to extract the files from the tar file, v for verbose to print to the screen what is going into the tar file, and f for files.