Tar: Difference between revisions
New page: go to Main Page, Computational Resources, Information & Help, Linux & Unix tar is both a file format and the name of a program used to handle such files. Initially develop... |
No edit summary |
||
| Line 1: | Line 1: | ||
go to [[Main Page]], [[Computational Resources]], [[Information & Help]], [[Linux & Unix]] | go to [[Main Page]], [[Computational Resources]], [[Information & Help]], [[Linux & Unix]] | ||
tar is both a file format and the name of a program used to handle such files. Initially developed to be written directly to sequential I/O devices for tape backup purposes, it is now commonly used to collect many files into one larger file, for distribution or archiving, while preserving file system information such as user and group permissions, dates, and directory structures. | tar is both a file format and the name of a program used to handle such files. Initially developed to be written directly to sequential I/O devices for tape backup purposes, it is now commonly used to collect many files into one larger file, for distribution or archiving, while preserving file system information such as user and group permissions, dates, and directory structures. | ||
* To create a tar: tar -cvf file.tar file1 file2 file3 | * To create a tar: '''tar -cvf file.tar file1 file2 file3''' | ||
That will create a tar called file.tar containing in a single file the files: file1 file2 file3 | |||
The command tar -cvzf file.tar.gz file1 file2 file3, will create the file file.tar.gz, that is the same tar as above file.tar with the three files, but it will compress it with gzip. | |||
* To get the files from a tar: '''tar -xvf file.tar''' | |||
This will unpack the file, and the files contained in it will be extracted. | |||
For compressed files tar -xzvf files.tar.gz should be used. | |||
Revision as of 10:27, 3 August 2009
go to Main Page, Computational Resources, Information & Help, Linux & Unix
tar is both a file format and the name of a program used to handle such files. Initially developed to be written directly to sequential I/O devices for tape backup purposes, it is now commonly used to collect many files into one larger file, for distribution or archiving, while preserving file system information such as user and group permissions, dates, and directory structures.
- To create a tar: tar -cvf file.tar file1 file2 file3
That will create a tar called file.tar containing in a single file the files: file1 file2 file3 The command tar -cvzf file.tar.gz file1 file2 file3, will create the file file.tar.gz, that is the same tar as above file.tar with the three files, but it will compress it with gzip.
- To get the files from a tar: tar -xvf file.tar
This will unpack the file, and the files contained in it will be extracted. For compressed files tar -xzvf files.tar.gz should be used.