The command "time" doesn't accept any option arguments

ZIYAD A. M. AL-BATLY zamb at
Sun May 1 04:42:51 UTC 2005

On Sun, 2005-05-01 at 10:15 +0800, Shixin Zeng wrote:
> I tried:
> $time --help
> bash: --help: command not found
> real    0m0.052s
> user    0m0.000s
> sys     0m0.001s
> $time -f "%E real,%U user,%S sys" ls -Fs #An example from `man time`
> bash: -f: command not found
> real    0m0.001s
> user    0m0.000s
> sys     0m0.001s
> Its behavior is completely different from the manual.
> -- 
> Best regards
> Shixin Zeng

Actually, there are two "time" commands and you're mistaken one for the
other.  Here:
        zamb ~ $ time --help
        bash: --help: command not found
        real    0m0.005s
        user    0m0.000s
        sys     0m0.002s
        zamb ~ $ type time
        time is a shell keyword
        zamb ~ $
        zamb ~ $ /usr/bin/time --help
        Usage: /usr/bin/time [-apvV] [-f format] [-o file] [--append]
                [--verbose] [--portability] [--format=format]
                [--output=file] [--version] [--quiet] [--help] command

The first version is the BASH built-in, the second is the application
"/usr/bin/time".  The man page is for the second one (the application).
To get more info on BASH's built-in "time" see "man bash".

I hope this clarify things for you.

More information about the ubuntu-users mailing list