Operating System - HP-UX
1835665 Members
2579 Online
110082 Solutions
New Discussion

Re: script to capture time spent

 
SOLVED
Go to solution
M Zubair_1
Advisor

script to capture time spent

Can someone help me in writing a small shell script to capture the "time" spent by a command?
I have to do some data migration from one file system to another. Planning to use tar (copy/extract in one command). Same process will be applied to two different boxes. The two servers have more or less the same file systems. I want to know how long each file system take so that I can plan exact down time for the other box.
Thanks in advance!
5 REPLIES 5
Ashwani Kashyap
Honored Contributor

Re: script to capture time spent

# man time
M Zubair_1
Advisor

Re: script to capture time spent

Thanks!
Rodney Hills
Honored Contributor
Solution

Re: script to capture time spent

# man timex
There be dragons...
Jeff Schussele
Honored Contributor

Re: script to capture time spent

Hi,

timex is a precanned command to give you what you're looking for.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
M Zubair_1
Advisor

Re: script to capture time spent

Thanks everyone!