Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 318
  • Last Modified:

what TAR is doing??

I've fired TAR command and forget to give option -v in command.
TAR is taking backup of 50 files.
Now TAR iw sorking and and NOW I want to know what TAR is working i.e. TAR is taking backup of which file right now.
0
vimal_rai
Asked:
vimal_rai
1 Solution
 
Nisus091197Commented:
Hi,

There are a few options.

I would use 'lsof'. It is use for listing open files.  You can get if from http://www.sunfreeware.com

You could also use the 'truss' command.  Not the easiest one to use but quite informative.

Finally, if you do a 'tar tvf' of the output file, it will possibly tell you how far it has gotten.

Regards, Nisus
http://www.omnimodo.com
0
 
beskyCommented:
You can trace any running process with
truss -p PID (of tar process)

there are more options for tracing systemcalls etc

OR check the PID of the tar process
use the command pfiles PID to see what files the tar process has opened. It will be one for /dev/rmt/0 ( if you are running to tape) and another file that is read from ( plus stdin,stderror, libs etc )



HTH
0
 
roy911Commented:
Hi,

As besky suggested, you could use truss -p <PID> -topen, which means you would only be tracing open syscalls. Grep'ing for a specific filename/directory name out of the output will should you what the tar command is acting on at that time.

RR
0
 
liddlerCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

PAQ  No refund

Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

liddler
EE Cleanup Volunteer
0
 
moduloCommented:
PAQed - no points refunded (of 50)

modulo
Community Support Moderator
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now