tar command loop during execution


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users tar command loop during execution
# 15  
Old 07-07-2009
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!
# 16  
Old 07-08-2009
have you tried ...

tar -cvf ../directory_name.tar *
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