Link to home
Start Free TrialLog in
Avatar of vimal_rai
vimal_rai

asked on

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.
Avatar of Nisus091197
Nisus091197

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
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
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
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
ASKER CERTIFIED SOLUTION
Avatar of modulo
modulo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial