Quote:
Originally Posted by ramalakshmi
Let me explain clearly:
Suppose i created one file called lost with .tar = lost.tar in /root directory
Files (hai, hello) two files are extracted in lost.tar
Now i want un extract this lost.tar and seperate those files as usual
What are command should use to extract only .tar command???
|
Firstly, fatmac and pan64 are correct.
To extract files from a tar file you use the -x option.
My simple two tar "view" and "extract" argument lists are: -tvf and -xvf.
The -tvf will list the files in the tar file for you.
The -xvf will extract the files the tar file for you.
Note that tar means (t)ape (ar)chive.
This goes back to the days when people backed up data onto large reel to reel tapes.
https://www.zdnet.com/pictures/tale-...0-years-at-ibm
And all that tar normally does is to concatenate files together in an organized fashion so that it knows how to extract the files in their original form.
It can optionally zip the archive file, and these days you do not need any arguments to do this, just when you create you use a filename with the zip extension, such as .xz or .bz2 or so forth.
A final point is that when you say the two files are extracted in lost.tar; that would be a technically incorrect thing to say. They are archived in that file and to get them out you would perform an extract operation.
If you're experimenting with tar, then a suggestion is to use two one line text files, put those into a tar archive, then cat the tar file to see what it shows. This should make more clear my point that it is really a concatenation of those files, with additional information used by the tar program.