HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
cancel
Showing results for 
Search instead for 
Did you mean: 

tar command

 
antonio calo
Occasional Visitor

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
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
Occasional Visitor

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
Occasional Visitor

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
Occasional Visitor

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 ***

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?