Extracting Files from an Archive

To extract (or unpack) the contents of a tar archive, use tar with the `−x' ("extract") option. · To extract the contents of an archive called `project.tar', type: $ tar −xvf project.tar RET

This command extracts the contents of the `project.tar' archive into the current directory. If an archive is compressed, which usually means it will have a `.tar.gz' or `.tgz' extension, include the `−z' option. To extract the contents of a compressed archive called `project.tar.gz', type:

$ tar −zxvf project.tar.gz RET

NOTE: If there are files or subdirectories in the current directory with the same name as any of those in the archive, those files will be overwritten when the archive is extracted. If you don't know what files are included in an archive, consider listing the contents of the archive first (see section Listing the Contents of an Archive). Another reason to list the contents of an archive before extracting them is to determine whether the files in the archive are contained in a directory. If not, and the current directory contains many unrelated files, you might confuse them with the files extracted from the archive. To extract the files into a directory of their own, make a new directory, move the archive to that directory, and change to that directory, where you can then extract the files from the archive.

Posted on: 16/12/2009








0 Comments
If you want to leave a comment please Login or Register
How to backup your data using rsync......
Understanding autoconf......
The Basics of fdisk......
Accessing Memory Using DMA......
The fd Directory......