Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to track the amount of time the process takes for when I move around my data and upgrade my web app. From the command line, how would I track the amount of time elapsed from when the pg_restore command starts to when it finishes?

share|improve this question
See also: unix.stackexchange.com/questions/16615/… . – landroni Mar 6 '14 at 16:11

The same way you'd time any other shell command: use the time command.

$ time pg_restore ...
real    1m0.000s
user    1m0.000s
sys     0m0.000s

Here, real is the elapsed wall clock time, which is probably the only meaningful value, since most of the work is being done in a separate process (the PostgreSQL server).

share|improve this answer

Your Answer


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.