Quote:
Originally Posted by Geldy
Can anyone help me to staff three files with tar command and then unstaff them
Thx in advance for any help.
To create a tar archive:
tar cvf my_archive,tar /path/to/file1 /another/path/to/file2 /and/one/more/path/file3
The disadvantage of diong it this way is that all references to the files are by using an absolute path.
This means when you untar the archive the files will be stored to their original location (for the experts around, I know there are tricks to avoid this.)
So it's better to create an archive in which the references to the file have relative paths:
cd /
tar cvf my_archive,tar path/to/file1 another/path/to/file2 and/one/more/path/file3
To view the contents of your tar archive:
tar tvf my_archive
The untar the archive:
tar xvf my_archive
If the archive contains files with absolute path the files will be untarred to their original location.
If they have relative paths, the files will be untarred relative to the current directory.