tar command loop during execution

I've some problem concerning tar command.
Sometime tar command submitted to create a tar file, in execution loop over the same group of files.

Can anyone help me?

Tanks

That is most probably because you have links somewhere...

Hi vbe, I've not link in input structures.

Have you any other suggestions or idea?

Tanks

The best would be you show us the passed command on what OS...

OK, you are right! I'm sorry.
I use HP-Unix as OS and the command submitted is tar -cvf directory_name.tar directory_name.

Try this...
tar -cvf directory_name.tar directory_name/*

Hi jayan_jay, I already tryed to use this sintax, but the results is unchanged. Now I'm trying to use short directory name, because I think files path may be to be too long.

Another aspect of problem is that the syntax you suggest works if command is submitted by hand but doesn't work if submitted by command file.

Thanks

Try to change the lengthy directory name and use it in a script.. If no use, then revert to proceed further..

Can you try with cpio to see if same problem occurs?

find <directory> -print | cpio -ocv ><dirname>.cpio
To see the content...
cpio -cit< <dirname>.cpio

cpio work correctly, but I cannot substitute tar with cpio because other scripts are based on a tar file.

---------- Post updated at 06:36 AM ---------- Previous update was at 06:33 AM ----------

javan_jay the length of file path doesn't affect the behaviour of the command.

If cpio passes and not tar, then Im quite sure there is hidden links...
so try again using tar's -l option (HPUX11.11 man:

Hi vbe, I submitted tar command with -l options. No error and no warning were issued by tar.
Bye

---------- Post updated at 10:19 AM ---------- Previous update was at 10:17 AM ----------

... and I'm sure that there's no link in the input structure (I've verified with ll -R command too)

Can you show us a example?
What OS version and what architecture?
what type of FS?
If its VXFS have you tried to defragment the directories yet?

Show an example may be very hard, because I'm try to tar a very big structure (992 files for over 1.5 GB). All what I can do is to send you a text file containing the output issued by tar, if you tell me how I can.
I'm using HP-Unix B.11.00 on a RISC machine, FS is a VXFS type and I didn't try to defragment the directories before.
In any case I can add another information. I tried to tar files beeing directly into the directory that contains them and tar returned a tar file as expected.
Bye

Well show us the command you pass, and comment what is happening:is it the archive never finishes (because its looping..) or what...
Very strange that if you go in the directory (that means now you user tar -cvf... *, yes?) it works!

have you tried ...

tar -cvf ../directory_name.tar *