problem in tar command


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers problem in tar command
# 1  
Old 05-12-2008
Data problem in tar command

i have a tar file that needs to extracted from a file ... i am using the following command
zcat /NRS/$tar_name | tar xvfB - ...
if i give this command directly in the unix box it works ... but if it try to give it in a script it is failing ... it is unable to extract some files, says it cannot set time for those files and the ouput of the tar is all over the screen and not in a line by line format .. pls help
# 2  
Old 05-12-2008
The extract and setting filetimes thing is file ownership problems, it looks like the script should run with privilege.

As to formatting, see if this helps:
Code:
zcat /NRS/$tar_name | tar xvfB -  > logfile

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

UNIX command to check if file name ends with .tar OR if the file is a tar file

Hello Team, Would you please help me with a UNIX command that would check if file is a tar file. if we dont have that , can you help me with UNIX command that would check if file ends with .tar Thanks in advance. (10 Replies)
Discussion started by: sanjaydubey2006
10 Replies

2. Shell Programming and Scripting

Single command - unzip files from a tar command

I have a tar file that contains multiple .Z files. Hence I need to issue a tar command followed by a gzip command to fully extract the files. How do I do it in a single command? What I'm doing now is tar xvf a.tar (this will output 1.Z and 2.Z) gzip -d *.Z (to extract 1.Z and 2.Z) (9 Replies)
Discussion started by: ericlim
9 Replies

3. Shell Programming and Scripting

tar command to explore multiple layers of tar and tar.gz files

Hi all, I have a tar file and inside that tar file is a folder with additional tar.gz files. What I want to do is look inside the first tar file and then find the second tar file I'm looking for, look inside that tar.gz file to find a certain directory. I'm encountering issues by trying to... (1 Reply)
Discussion started by: bashnewbee
1 Replies

4. Linux

Problem with tar

Hello everyone, I´ve got a problem when I try to untar a file. The following errors appear: tar: Skipping to next header tar: Skipping to next header tar: Exiting with failure status due to previous errors Can anyone help me? Thanks in advance! (4 Replies)
Discussion started by: katkat
4 Replies

5. Shell Programming and Scripting

tar command dont tar to original directory

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. Solaris

problem with tar command in solaris9 on sun U10

I try to install globus toolkit 4 and have major problem that's error in tar command while it install by make command tar -C /usr/local/globus/ -xzf binary-trees/globus_libtool-*/*.tar.gz tar: C: unknown function modifierand it notice me to use tar {c|r|t|u|x} I think it can't use -z... (3 Replies)
Discussion started by: Harmut
3 Replies

7. UNIX for Dummies Questions & Answers

tar -cvf test.tar `find . -mtime -1 -type f` only tar 1 file

Hi all, 4 files are returned when i issue 'find . -mtime -1 -type f -ls'. ./ora_475244.aud ./ora_671958.aud ./ora_934052.aud ./ora_934050.aud However, when I issued the below command: tar -cvf test.tar `find . -mtime -1 -type f`, the tar file only contains the 1st file -... (2 Replies)
Discussion started by: ahSher
2 Replies

8. Shell Programming and Scripting

problem is tar

i have some 685 files in my directory.Below the count: find . -name "CurrentCollectorMeterReadBackup_2009*" -exec ls -ltr {} \; | wc -l 685 i want to tar them but it is telling me arg list too long. how to tar all this files in one shot tar -cvf - -L... (1 Reply)
Discussion started by: ali560045
1 Replies

9. Shell Programming and Scripting

tar doubts - problem with tar

The below tar command works fine for me, tar -cvf - `find ./srcdir -type d` | (cd ./destdir ; tar -xvf - ) but this version is giving error to me: cd ./srcdir && tar -cf - . | gzip -9 | cd ../destdir && gzip -d | tar -xf - error is: gzip: compressed data not read from a terminal.... (2 Replies)
Discussion started by: royalibrahim
2 Replies

10. UNIX for Advanced & Expert Users

problem with tar

First of all I have already asked about this in the scripts/perl forum but the advice I got did not do the trick. A script I have to use unzips some xxx.tar.gz files and then tries to tar -xvf them. on the tar -xvf I get the following:- tar: code/sql: Cannot utime: Operation not permitted... (14 Replies)
Discussion started by: ajcannon
14 Replies
Login or Register to Ask a Question