03-23-2010
tar xvf to a different directory?
Hi all,
I have a tar file that was done with tar -cvf <tar_file> /directory.
Is there any way that I can untar this, i.e. tar -xvf <tar_file> into a different directory?
So far Google said you can't do tar -xvf to a different directory.
Unfortunately, am not the one doing the tar -cvf and I cannot convince the third-party to change their scripts as this is the syntax in all of their scripts.
Any advise of any workaround will be very much appreciated. Thanks in advance.
9 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
On a newly configured hp unix server, I got the following error while I was trying to untar a file:
tar -xvf 9201rdbms.tar
....
/htc_ora_prod/stage9.2.0_64bit/Disk2/stage/Components/oracle.rdbms.seeddb.compoltp/9.2.0.1.0/1/DataFiles/Expanded/seed/templates/Transaction_Processing.dfj, 174282115... (2 Replies)
Discussion started by: YuChing
2 Replies
2. Solaris
Hi,
When i am trying to untar a file for installation its showing an error like
tar -xvf te_agent__sparc.en_tar.gz
tar: directory checksum error
Please help me to solve this issue........... (10 Replies)
Discussion started by: Renjesh
10 Replies
3. AIX
Hello
Im trying to extract this file
tar -xvf opt-samba-base.tar.tar
tar: 0511-169 A directory checksum error on media; 0 not equal to 75420.
but I get that message
I tried algo with gunzip and uncompress but nothing happens
gunzip -d opt-samba-base.tar.tar
gunzip:... (2 Replies)
Discussion started by: lo-lp-kl
2 Replies
4. Shell Programming and Scripting
Dears,
I have copied one compressed file from one directory to another directory
say finame.txt.tar.gz copied from FirstDirectory to SecondDirecory
cd FirstDirectory /
cp finame.txt.tar.gz SecondDirecory
cd SecondDirecory/
once i do gunzip to finame.txt.tar.gz it, the file got... (4 Replies)
Discussion started by: faiz
4 Replies
5. Shell Programming and Scripting
HI,
if I have a tarfile called pmapdata.tar that contains
tar -tvf pmapdata.tar
-rw-r--r-- 0/0 21 Oct 15 11:00 2009 /var/tmp/pmapdata/pmap4628.txt
-rw-r--r-- 0/0 21 Oct 14 20:00 2009 /var/tmp/pmapdata/pmap23752.txt
-rw-r--r-- 0/0 1625 Oct 13 20:00 2009... (1 Reply)
Discussion started by: borderblaster
1 Replies
6. UNIX for Advanced & Expert Users
I want to backup all the directory tress, including hidden directories, without copying any files.
find . -type d gives the perfect list.
When I tried tar, it won't work for me because it tars all the files.
find . -type d | xargs tar -cvf a.tar
So i tried rsync.
On my own test box, the... (4 Replies)
Discussion started by: fld2007
4 Replies
7. UNIX for Advanced & Expert Users
Good afternoom,
I have a file very big, when I execute tar xvf XXXXXX_2010.tar, and show me this in the screen.
x XXXXXX_2010_(01_DE_18).ixf, 3330845041 bytes, 6505557 media blocks.
x XXXXXX_2010_(02_DE_18).ixf, 3336071703 bytes, 6515766 media blocks.
x XXXXXX_2010_(03_DE_18).ixf, 3333011013... (3 Replies)
Discussion started by: systemoper
3 Replies
8. Solaris
I have recently built a new server and patched Soalris 10 up tp latest bundle etc...
When I run a decompress using the format zcat fred.Z |tar -xvf - it runs at a very slow rate.
A similiar server which is less powerful runs over twice as quick.
Is there any work arounds to configure decompress... (4 Replies)
Discussion started by: smcart
4 Replies
9. AIX
Quick question,
is it possible to make a Tar of completely directory and placing the tar file in it (will this cause even the tar file to tarred ?)
sample:
/opt/freeware/bin/tar -cvf - /oracle | gzip > /oracle/backup.tgz
will the tar file backup.tgz also include backup.tgz ?
i tried... (5 Replies)
Discussion started by: filosophizer
5 Replies
LEARN ABOUT DEBIAN
bf_tar
BF_TAR(1) Bogofilter Reference Manual BF_TAR(1)
NAME
bf_tar - shell script to write a tar file of a bogofilter directory to stdout
SYNOPSIS
bf_tar [-r] [-R] bogofilter_directory
DESCRIPTION
bf_tar bundles a bogofilter working directory in tar format and copies it to standard output (your console, or where you redirect it, see
EXAMPLES below).
OPTIONS
The -r option causes bf_tar to remove inactive log files after the archive has been written successfully. The default is to leave log
files.
The -R option causes bf_tar to remove inactive log files before the archive is written. This may reduce chances that the resulting archive
is recoverable should it become damaged. The archive may be smaller though. The default is to leave log files.
EXIT STATUS
The script exits with status code 0 if everything went well, and nonzero if it encountered trouble.
EXAMPLES
o bf_tar ~/.bogofilter > outfile.tar
Writes a standard .tar file containing the essential files from ~/.bogofilter to outfile.tar.
o bf_tar ~/.bogofilter | gzip -9 -c > outfile.tar.gz
Writes a gzipped .tar.gz file containing the essential files from ~/.bogofilter to outfile.tar.gz.
o bf_tar `pwd`/mydirectory > outfile.tar
Prepend $(pwd)/ or `pwd`/ if you want to specify an absolute path instead of a relative path.
NOTES
This script is meant for use with Berkeley DB based bogofilter versions.
This script requires a SUSv2 compliant pax utility.
This script expects a SUSv2 compliant shell. Solaris systems should have the SUNWxcu4 package installed (when bogofilter is configured) so
that /usr/xpg4/bin/sh can be used.
AUTHORS
Matthias Andree
Bogofilter 03/15/2010 BF_TAR(1)