[CentOS] Timing a command

Matt Shields mattboston at gmail.com
Sat Jan 26 00:16:54 UTC 2008


On Jan 25, 2008 7:05 PM, Scott Ehrlich <scott at mit.edu> wrote:
> I want to keep track of how long a task is running.  Thinking it wouldn't
> take that long, I opted not to run time before it.  The fact that it is
> taking a long time, if I revisit the machine in the morning, what would be
> the best way to find out what time it ended?
>
> In this case, I'm using mt to erase an lto3 tape - sudo mt -f /dev/st0
> erase.  But I'd like to use the knowledge from this question to track
> other events, too.
>
> I feel like I should know this answer, but cannot think of the solution at
> the moment.
>
> Thanks.
>
> Scott


just add 'time' before your command.  like this:

time sudo mt -f /dev/st0 erase


-- 
-matt



More information about the CentOS mailing list