Problem with time command
freebsd at edvax.de
Fri Apr 21 20:22:21 UTC 2017
On Fri, 21 Apr 2017 16:08:54 -0400, Ernie Luzar wrote:
> Polytropon wrote:
> > On Fri, 21 Apr 2017 12:30:48 -0400, Ernie Luzar wrote:
> >> issuing time -h custom.refresh
> >> results in error message -h: Command not found
> >> issuing time -p custom.refresh
> >> results in error message -p: Command not found
> > I assume you're running this command interactively from within the
> > C shell, right? In this case, use /usr/bin/time to use the actual
> > "time" binary. If you don't, the C shell's built-in time command
> > will be used.
> No I issued "time -h" "time -p" from the console command line.
> "custom.refresh" is a sh script.
> I just tried "time date" from the command line and get the same results
> as posted above.
This is to be expected. When you interactively issue the command
"time" from the C shell (which is the default interactive shell),
the shell's internal time function will be used:
% time -h true
-h: Command not found.
0.000u 0.000s 0:00.00 0.0% 0+0k 0+0io 0pf+0w
You need to explicitely specity that you wish to run the actual
time _program_, by prefixing "time" with the path:
% /usr/bin/time -h true
0.00s real 0.00s user 0.00s sys
This will work; "man 1 time" refers to that program, _not_ to the
C shell's internal implementation.
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions