'time' does not recognise any options

Bug #220512 reported by Ramon Casha
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
time (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: time

Ubuntu 7.10
time: 1.7-21build1

The 'time' command is described in its man page as recognising a number of options, such as -a or -f. However these do not work - time attempts to interpret them as commands.

eg:
----------------
time -f "%e" ls
bash: -f: command not found

real 0m0.236s
user 0m0.128s
sys 0m0.028s
----------------

Revision history for this message
Lars Ljung (larslj) wrote :

Thanks for the bug report. I was about to confirm this but... There is a built-in command in bash with the same name, so you have to call /usr/bin/time explicitly.

Revision history for this message
Ramon Casha (rcasha) wrote :

Dayum that was well hidden! :)

I wonder whether something should be done about it... whether anything CAN be done about it. Maybe a warning in the man page or something.

Revision history for this message
Lars Ljung (larslj) wrote :

Actually it's already in the man page: "Users of the bash shell need to use an explicit path in order to run the external time command and not the shell builtin variant." I think you can mark this bug as invalid.

trollord (trollenlord)
Changed in time:
status: New → Invalid
Revision history for this message
Andrew (andrewkvalheim) wrote :

This was driving me crazy until I found the above explanation. Well hidden indeed!

I stuck the following in my .bashrc for convenience:

        alias time=$(which time)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.