Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 1
    And here's a simplified version of the precmd-through-DEBUG trick. Commented Apr 26, 2011 at 22:59
  • See also unix.stackexchange.com/questions/8607/… Commented Apr 26, 2011 at 23:30
  • wish this was available in bash! Commented Apr 27, 2011 at 19:46
  • See Gilles's and others links, it is implementable in bash with a little extra fiddling. The again, why don't you just run zsh? It's a rocking shell with more good reasons to switch than just this! Commented Apr 27, 2011 at 19:48
  • 2
    If you're using zsh there is an even better way to do it. The REPORTTIME environment variable when set will output the execution time info (as if you had run the command with 'time' in front of it) for any command taking longer than $REPORTTIME seconds. Just set it to 0 and it should tell you the time for every command, with the user/sys breakdown to boot. Commented Apr 27, 2011 at 23:54