tar command loop during execution


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users tar command loop during execution
# 8  
Old 07-02-2009
Try to change the lengthy directory name and use it in a script.. If no use, then revert to proceed further..
# 9  
Old 07-02-2009
Can you try with cpio to see if same problem occurs?
Code:
find <directory> -print | cpio -ocv ><dirname>.cpio
To see the content...
cpio -cit< <dirname>.cpio

# 10  
Old 07-02-2009
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.
# 11  
Old 07-02-2009
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:
Quote:
l Tell tar to complain if it cannot resolve all of the links
to the files being saved. If l is not specified, no error
messages are printed.
# 12  
Old 07-06-2009
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)
# 13  
Old 07-07-2009
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?
# 14  
Old 07-07-2009
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
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Creating for loop for tar -tvf doesnt work

hi all, i have created a for loop, it looks like this - #!/bin/bash cd /mnt/local/data/tars for tar in * do base=$(basename "$tar") "$base" -tvf >> /mnt/local/data/logs/"$base".csv done but i get this error - ./tar_loop.sh: line 8:... (2 Replies)
Discussion started by: robertkwild
2 Replies

2. Shell Programming and Scripting

Multiple command execution inside awk command during xml parsing

below is the output xml string from some other command and i will be parsing it using awk cat /tmp/alerts.xml <Alert id="10102" name="APP-DS-ds_ha-140018-componentFailure-S" alertDefinitionId="13982" resourceId="11427" ctime="1359453507621" fixed="false" reason="If Event/Log Level(ANY) and... (2 Replies)
Discussion started by: vivek d r
2 Replies

3. Shell Programming and Scripting

Want to terminate command execution when string found in the command output

Hi Experts, I am very much new to linux scripting, I am currently working on reducing my manual work and hence writing a script to automate few task. I am running below command to snmpwalk the router.. snmpwalk -v 3 -u WANDL_SU -a MD5 -A vfipmpls -x DES -X VfIpMpLs -l authPriv... (19 Replies)
Discussion started by: Hanumant.madane
19 Replies

4. Shell Programming and Scripting

For loop like execution in shell

Hi, In the script that i work now, I wrote the script such a way that the values retrieved using a tcl script is passed into a shell script to specify the path where the specific file needs to be sourced exists. For eg: I got a path from the tcl script given below, ... (6 Replies)
Discussion started by: shivashankar_S
6 Replies

5. Shell Programming and Scripting

Problem in loop execution

Below is my code. I want a loop in this way that if folder has tag sub-folder then it will show the list of tags otherwise it will show the subfolders of that folder and then again user will select sub-folder and if tags found then show the tag list otherwise show all subfolders till he finds the... (3 Replies)
Discussion started by: anuragpgtgerman
3 Replies

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

7. Shell Programming and Scripting

Execution of SQLs thru loop

Hi, I have a file in which I have a number of insert statements (number is not fixed, it may have 10 statements or may be 1000....not fixed). I want to execute these statements using a loop (1 statement per iteration). For ex: Input file has following statements: Insert statement #... (6 Replies)
Discussion started by: ustechie
6 Replies

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

9. Programming

how to stop execution in for loop

Hi all, I am working on a c source code nearly 2000 line . it contains one big for( i=0; i< 200 ; i++ ) loop of around 600 lines could any tell me how to break the execution of prog when the value of i is 50 in for loop so that i can check inside the loop. Thanks.. (1 Reply)
Discussion started by: useless79
1 Replies

10. Shell Programming and Scripting

Find & tar execution problem

I'm trying to set up a stanard sh script that will find all the files that have been changed within the last day and then tar them up. I think the command line should be something like : find /home/bob -atime +0 -exec \ tar cvf /home/bob/files.tar {}\; Help please ... Thanx (3 Replies)
Discussion started by: ianf
3 Replies
Login or Register to Ask a Question