Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I would like to call a program from a script, (malwarebytes, chkdsk, A/V scan) and have the script keep track of how long the program ran. Could someone point me in the direction of what I should be looking for to get this accomplished?

share|improve this question
    
You mean like time? –  Ignacio Vazquez-Abrams May 17 '13 at 12:43

3 Answers 3

On Unix/Linux, you can use the time(1) command for this.

share|improve this answer

You can use the time command e.g.

time ls -lR
real    0m0.178s
user    0m0.034s
sys     0m0.104s
share|improve this answer

I'm assuming that you're talking about a Windows environment:

malwarebytes, chkdsk

There's a post on stackoverflow that covers multiple ways to accomplish your goal depending upon your OS version and tools available (PowerShell, notably).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.