Time

Paul Smith paul at mad-scientist.net
Tue Nov 5 18:43:20 UTC 2019


On Tue, 2019-11-05 at 18:15 +0000, Grizzly via ubuntu-users wrote:
> sudo apt update && time sudo apt upgrade
> 
> So it may be a stupid question but what does "time" do in the middle
> there?

It prints out how long the command took to run.  That's all.

> I know that if update is not run often and is on a slow connection,
> sudo can time out before before that second sudo command (so need
> password again) is this a work-around? or a check to insure the
> password is required

Nope, nothing like that.  The time command will run the command given
as arguments and, when it's done, print how long it took to run.

  $ time sleep 5

  real    0m5.001s
  user    0m0.001s
  sys     0m0.000s






More information about the ubuntu-users mailing list