9

Whenever I try to use options with the time command, such as format (-f, --FORMAT), I get the following error:

bash: -f: command not found

How do I use options with time?

1 Answer 1

11

You are invoking the bash's built-in version of time, which has slightly different behavior and options – described in bash's manual as well as help time.

Use command time ... to bypass the built-in and execute the external command; or run /usr/bin/time ... directly.

7
  • This fixed my issue. I was unaware there was a difference between the man page and bashes version on any of the commands, add that to the things I learned today.
    – Wipqozn
    Mar 8, 2012 at 16:28
  • If it's all settled, click the check mark next to the answer to accept this answer. Mar 8, 2012 at 16:30
  • 2
    Bash's built-in type function will show which you'll run -- e.g. type time. Add the -a option to show all -- type -a time Mar 8, 2012 at 16:32
  • 1
    @DougHarris I know how to accept an answer, but there is a 15 minute delay between asking and when you can accept.
    – Wipqozn
    Mar 8, 2012 at 16:33
  • Ah, sorry. The downside to getting help so quickly :-) Mar 8, 2012 at 16:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .