How can I give arguments to time command (ubuntu)

I want to get a bit more information than the standard time command gives, so I want to pass the verbose flag. info time gives as example time -v sleep 4, however when I execute that (both in bash or tcsh) I get

% time -v sleep 4
-v: Command not found.
0.000u 0.000s 0:00.00 0.0%  0+0k 0+0io 0pf+0w

What am I doing wrong?


Solution 1:

If you execute time then (even though which time will claim otherwise...) you execute the time command of the shell. That version does not accept -v. Instead, execute the proper time executable: [source]

$ /usr/bin/time -v sleep 4

That will work.