Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

up vote 5 down vote accepted

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.

share|improve this answer
    
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 '12 at 16:28
    
If it's all settled, click the check mark next to the answer to accept this answer. –  Doug Harris Mar 8 '12 at 16:30
1  
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 –  Doug Harris Mar 8 '12 at 16:32
    
@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 '12 at 16:33
    
Ah, sorry. The downside to getting help so quickly :-) –  Doug Harris Mar 8 '12 at 16:34
show 3 more comments

Your Answer

 
discard

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.