1748181 Members
4140 Online
108759 Solutions
New Discussion юеВ

tar command

 
antonio calo
New Member

tar command

Can anyone help me why a tar command loop during execution?
I've to say that the structure I'm trying to tar doesn't contain link at all.

Thanks in advance
8 REPLIES 8
DeafFrog
Valued Contributor

Re: tar command

Hello Antonio,

you can use a loop like :
1)create a file
cat > test1
./NDC.TRC032
./SMS.TRC015
./NDC.TRC033
./SMS.TRC016
./SMS.TRC017
2)use appropirate command to archive restore like, in this case archiving :
for i in `cat test1`
do
tar cvf /dev/rmt/??m $i
done

Hope that helps!
Regards ,
Rahul
FrogIsDeaf
antonio calo
New Member

Re: tar command

DeafFrog, my problem is that the tar execution loop over a same file group instead to tar all files in input.

In any case thanks for your suggestion.
Patrick Wallek
Honored Contributor

Re: tar command

An example of exactly what you are talking about would be very helpful.

antonio calo
New Member

Re: tar command

An example of what I mean is can be viewed in the attached file. Starting at its end and moving in upward direction you cas se that there's a group of the same file read under the same path (starting with file 3033t28p01.pnames)repeated several time.

V. Nyga
Honored Contributor

Re: tar command

Hi,

it could be a problem of your tar-command.
Can you give us the command that you're running?

Volkmar
*** Say 'Thanks' with Kudos ***
antonio calo
New Member

Re: tar command

Yes, of course. The command I used is

tar -cvf ok.tar ok.

I can add that when I try to tar files beeing in the MOCKUP directory, tar returns the expected output, it means that in that condition tar command work correctly
V. Nyga
Honored Contributor

Re: tar command

Hi again,

please test:
tar -cvf ok.tar ./ok

Also, can you give us a ll of the directory where you start the command.

V.
*** Say 'Thanks' with Kudos ***
Dennis Handly
Acclaimed Contributor

Re: tar command

>Starting at its end and moving in upward direction you can see that there's a group of the same file read under the same path

(It would help if you also annotated your file.)

You may have to use fsck to check the directory. I assume ll(1) works there?

Have you tried pax(1) instead of tar?
I assume you aren't using gnu tar?
What OS version?