05-30-2019
Also, if you for some reason do need both files (a tar file and a compressed tar file) you could run tar with the 'c' option but not the 'z' option which will create you a tar file.
You could then take a copy of that file before running compress on the tar file converting it to a tar.gz file.
Hope that's clear.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi All,
I have created a tar file by giving the below command :
all files of directory : /Accounts/2001/10/26
$tar -cvf Act26.tar /Accounts/2001/10/26
I copied into another server and given the following command:
$tar -xvf Act26.tar
then permision denied message came due to the... (3 Replies)
Discussion started by: krishna
3 Replies
2. UNIX for Dummies Questions & Answers
Hi!
I've uploaded a .tar file (created with Windows) containing my homepage to my webserver.
Now I'd like to extract the file on the server. I can do that with SSH.
BUT::
If i enter this command:
tar -xf homepage.tar
only the files in the root directory of the file get extracted.... (2 Replies)
Discussion started by: roberthawke
2 Replies
3. UNIX for Advanced & Expert Users
Hi,
when I extract a TAR archive by tar -xf file.tar
the file.tar file stays on disk. Then I need two time the disk space.
How can I avoid that ? How to ask not to keep file.tar ?
Many thanks. (8 Replies)
Discussion started by: big123456
8 Replies
4. UNIX for Dummies Questions & Answers
Hi, I am Nico.
I have a tarball that i can't extract.
I have this file: FlussiIbox.20060215.tar
when i write "tar tf FlussiIbox.20060215.tar"
the output is:
/u01/USCITA/jobs/SUNRISE/output/IBOX.counter.20060212.dat.gz
/u01/USCITA/jobs/SUNRISE/output/IBOX.counter.20060213.dat.gz... (1 Reply)
Discussion started by: volleyboy
1 Replies
5. Shell Programming and Scripting
hi all,
kindly help me how to extract one file form .tar.gz without uncompressing .tar.gz file.
thanks in advance
bali (2 Replies)
Discussion started by: balireddy_77
2 Replies
6. UNIX for Dummies Questions & Answers
I've got this Files.tgz containing
Fruits/Apple.txt
Drinks/Soda.txt
Drinks/Pepsi.txt
I would like to extract all files/directories with pattern "Fruits".
So, what I did was
tar -xvf File.tgz `tar -tf Files.tgz | grep 'Fruits'`
However, output is:-
Files/Fruits... (8 Replies)
Discussion started by: percivalwcy
8 Replies
7. UNIX for Dummies Questions & Answers
I need to extract a file,which contains the path to a new path.
sample tar file
tar -tfv class.tar | grep client
-rw------- 0/1 99 Jan 22 12:46 2004 /usr/openv/netbackup/db/class/mariner/clients
-rw------- 0/1 102 Sep 25 11:33 2007... (1 Reply)
Discussion started by: jouuu
1 Replies
8. Linux
Hi,
how can I extract glibc-2.3.2.tar.tar file ?
I used tar -xf but does not work.
Thank you. (4 Replies)
Discussion started by: big123456
4 Replies
9. UNIX for Dummies Questions & Answers
I would like to confirm my file.tar is been tar-ed correctly before I remove them. But I have very limited disc space to untar it.
Can I just do the listing instead of actual extract it? Can I say confirm folder integrity if the listing is sucessful without problem?
tar tvf file1.tar
... (1 Reply)
Discussion started by: vivien_chu
1 Replies
10. UNIX for Advanced & Expert Users
I was looking at this tutorial for tar extract Z file. Is there a reason why this did not work? I checked my man pages and it had a -Z option.
tar -xZvf /opt/Nimsoft/nimldr.tar.Z
tar (child): compress: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now... (2 Replies)
Discussion started by: cokedude
2 Replies
TAR(1) General Commands Manual TAR(1)
NAME
tar - archiver
SYNOPSIS
tar key [ file ... ]
DESCRIPTION
Tar saves and restores file trees. It is most often used to transport a tree of files from one system to another. The key is a string
that contains at most one function letter plus optional modifiers. Other arguments to the command are names of files or directories to be
dumped or restored. A directory name implies all the contained files and subdirectories (recursively).
The function is one of the following letters:
c Create a new archive with the given files as contents.
x Extract the named files from the archive. If a file is a directory, the directory is extracted recursively. Modes are restored if
possible. If no file argument is given, extract the entire archive. If the archive contains multiple entries for a file, the lat-
est one wins.
t List all occurrences of each file in the archive, or of all files if there are no file arguments.
r The named files are appended to the archive.
The modifiers are:
v (verbose) Print the name of each file treated preceded by the function letter. With t, give more details about the archive entries.
f Use the next argument as the name of the archive instead of the default standard input (for keys x and t) or standard output (for
keys c and r).
u Use the next (numeric) argument as the user id for files in the output archive. This is only useful when moving files to a non-Plan
9 system.
g Use the next (numeric) argument as the group id for files in the output archive.
EXAMPLES
Tar can be used to copy hierarchies thus:
{cd fromdir; tar c .} | {cd todir; tar x}
SOURCE
/sys/src/cmd/tar.c
SEE ALSO
ar(1), bundle(1), tapefs(1)
BUGS
There is no way to ask for any but the last occurrence of a file.
File path names are limited to 100 characters.
The tar format allows specification of links and symbolic links, concepts foreign to Plan 9: they are ignored.
TAR(1)