Tar stucks while extracting


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Tar stucks while extracting
# 15  
Old 12-04-2014
Sorry for misleading, but the shell script is ran as root user but please check tar command is ran as standard user.

Code:
su new -c "tar --no-overwrite-dir -hxf script.tar"

# 16  
Old 12-04-2014
Try redirecting the stdout and stderr streams from the tar command to files - one for stdout, one for stderr.

Since it seems to be hanging in a write() call invoked by a call to error(), which calls write() via a call to vfprintf(), I think it's most likely hanging trying to write to stderr.
# 17  
Old 12-05-2014
Thanks for suggestion will try at get back with results
# 18  
Old 01-06-2015
Hello,

I tried and was able to recreate issue, i have redirected tar command's stderr and stdout.

Code:
tar: home/freebee/work/data/Stress/Stress_SubmitOrderAccounts_UnReg.txt: time stamp 2015-01-06 01:33:50 is 28769.181311346 s in the future
tar: home/freebee/work/data/Stress/Stress1_WebID.txt: time stamp 2015-01-06 01:33:52 is 28771.180911411 s in the future
tar: home/freebee/work/data/Stress/LoggedIn_Account_AddPay.txt: time stamp 2015-01-06 01:33:52 is 28771.180680643 s in the future
tar: home/freebee/work/data/Stress/CatalogId.txt: time stamp 2015-01-06 01:33:48 is 28767.176821988 s in the future
tar: home/freebee/work/data/Stress/Stress_SubmitOrderAccounts_Reg.txt: time stamp 2015-01-06 01:33:50 is 28769.176726251 s in the future
tar: home/freebee/work/data/Stress/Stress1_Prod_SKU.txt: time stamp 2015-01-06 01:33:51 is 28770.176310871 s in the future
tar: home/freebee/work/data/Stress/WebId_SKUID12Sept.txt: time stamp 2015-01-06 01:33:51 is 28770.176042553 s in the future
tar: home/freebee/work/data/Stress/ForgetPass_Account.txt: time stamp 2015-01-06 01:33:52 is 28771.175666481 s in the future
tar: home/freebee/work/data/Stress/WebSku16Oct.txt: time stamp 2015-01-06 01:33:51 is 28770.175545522 s in the future
tar: home/freebee/work/data/Stress/KMCatalogId.txt: time stamp 2015-01-06 01:33:48 is 28767.175477947 s in the future
tar: home/freebee/work/data/Stress/Stress1_SKU.txt: time stamp 2015-01-06 01:33:50 is 28769.175223481 s in the future
tar: home/freebee/work/data/Stress/Stress_LoggedIn_Accounts.txt: time stamp 2015-01-06 01:33:52 is 28771.175149912 s in the future
tar: home/freebee/work/data/Stress/LoggedIn_Account.txt: time stamp 2015-01-06 01:33:52 is 28771.174131207 s in the future
tar: home/freebee/work/data/Stress/Stress_PromoCodes.txt: time stamp 2015-01-06 01:33:50 is 28769.174054509 s in the future
tar: home/freebee/work/data/Stress/PKY_NS1_WebId.txt: time stamp 2015-01-06 01:33:49 is 28768.173991133 s in the future
tar: home/freebee/work/data/Stress/ShipInfo.csv: time stamp 2015-01-06 01:33:50 is 28769.173929333 s in the future
tar: home/freebee/work/data/Stress/LoggedIn_Account_ShipBill.txt: time stamp 2015-01-06 01:33:52 is 28771.173405374 s in the future
tar: home/freebee/work/data/Stress/Stress1_Keywords.txt: time stamp 2015-01-06 01:33:48 is 28767.173143741 s in the future
tar: home/freebee/work/data/Stress/PKY_NS1_SKU.txt: time stamp 2015-01-06 01:33:49 is 28768.173036212 s in the future
tar: home/freebee/work/data/Stress: time stamp 2015-01-06 01:33:52 is 28771.172999897 s in the future
tar: home/freebee/work/data: time stamp 2015-01-06 01:33:48 is 28767.172980362 s in the future
tar: home/freebee/work: time stamp 2015-01-06 01:33:48 is 28767.172961002 s in the future
tar: home/freebee: time stamp 2015-01-06 01:33:48 is 28767.1729435 s in the future
tar: home: Cannot utime: Operation not permitted
tar: home: Cannot change mode to rwxrwxr-x: Operation not permitted
tar: Exiting with failure status due to previous errors

In stderr file these error messages were found
# 19  
Old 01-06-2015
What happens if you try adding the -m option?
Code:
$ man tar
-m, --touch
don't extract file modified time

# 20  
Old 01-06-2015
Further to my post#4 have you tried omitting the - from the command line?

Code:
 
 tar xf NCSanJose1_req_rep.tar

without the minus (-).

Some tar implementations do not treat the inclusion of (-) as optional and the (-) indicates that any flag requiring an argument is immediately followed by that argument.

I'm not expecting this to be a solution but do just try it.
# 21  
Old 01-06-2015
So does this still hang, or if this a failure? The text says that tar is exiting, so does it indeed now leave tar or is that process still running/stuck?

If it drops out, then there must be something else that is causing the hang. Do you, for instance read a message, and if there's no input it waits for the keyboard? .... or a myriad of other possibilities......



Robin
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extracting .tar.gz files

I have a directory tree containing archive .tar.gz files that I want to extract at the location where they recide. How can I achieve such an operation? (7 Replies)
Discussion started by: kristinu
7 Replies

2. OS X (Apple)

Uncompressing but not extracting tar.Z file

Hi I have a few hundred files with extension .tar.Z. These files were archived (tar) and compressed (Z) on a UNIX system. I need to unzip them but not extract them. In other words they need to go to .tar extension. I would like to do this on my MAC or on a windows pc. I do not have a UNIX... (3 Replies)
Discussion started by: kalbano
3 Replies

3. UNIX for Advanced & Expert Users

Extracting directories only from tar ball

Hi Somebody must have done this before, but I can't seem to find any answer on my problem. On HP-UX 11i v3 I have a relatively large tar ball (~120 GB), and I want to create the directory structure only from the archive. There is no option to make a new archive with only the directory... (3 Replies)
Discussion started by: hpvm_adm
3 Replies

4. Shell Programming and Scripting

Extracting .tar files.

Hey guys complete n00b here so I'll try my best at explaining. I'm creating a backup and restore utility and decided to use tar. I create a backup folder in each user's account and when backing up (say word processing files), I use the following: tar cvf /home/user/backup/wpbackup.tar... (2 Replies)
Discussion started by: EwanD
2 Replies

5. Filesystems, Disks and Memory

Extracting certain /paths/* using tar

forgive my ignorance. I did a search of this sub-forum for "tar -xp" and variations on the same w\out success, so here goes... Scenario: filename.tar file. Desired Task: I want to be able to extract only files from the user's public_html folder (and all those under it as an option) from... (4 Replies)
Discussion started by: Habitual
4 Replies

6. UNIX for Dummies Questions & Answers

Extracting from a tar archive file

Can I extract files from an archive file (tar), where the filename includes the full directory path, to a different directory? For example the archive files may have a filename of /SrcFiles/XXX/filename.dat and I want to extract it to /SrcFiles/YYY/filename.dat. Since the archive file was... (1 Reply)
Discussion started by: nmalencia
1 Replies

7. UNIX Desktop Questions & Answers

Extracting from a tar file

Can I extract files from an archive file (tar), where the filename includes the full directory path, to a different directory? For example the archive files may have a filename of /SrcFiles/XXX/filename.dat and I want to extract it to /SrcFiles/YYY/filename.dat. Since the archive file... (1 Reply)
Discussion started by: nmalencia
1 Replies

8. UNIX for Dummies Questions & Answers

extracting from a tar file

Dear experts I have received a tar file containing several files with full path. Now I need to restore it in another system but when I want to extract files by using tar -xvf tarfile it wants to create all files with full paths again in new system in which I don't have enough previleges. How... (4 Replies)
Discussion started by: Reza Nazarian
4 Replies

9. UNIX for Advanced & Expert Users

extracting from tar.bz2

hi could any body tell me how to extract .tar.bz2 files i tried using tar but in vain. i found bzip2 in googling but i could not find it on machine unix tru64 please suggest. (1 Reply)
Discussion started by: Raom
1 Replies

10. UNIX for Dummies Questions & Answers

error while extracting using TAR

Hi folks, When I am extracting an archive using the: tar -xvf /dev/rmt0 command i get the following error: x ./GRBD8901/GRBR006T, 1763253368 bytes, 3443855 media blocks. tar: 0511-197 ./GRBD8901/GRBR006T: Cannot write data extracted with the tar command: ... (7 Replies)
Discussion started by: Erik Rooijmans
7 Replies
Login or Register to Ask a Question