4 ms·
Can anyone comment why you can only use the verbose flag if you use the full path of time? time -v ls does not work but /usr/bin/time -v ls does? I
by boyter 7y ago
Can anyone comment why you can only use the verbose flag if you use the full path of time?
time -v ls
does not work but
/usr/bin/time -v ls
does? I don't have enough knowledge of either linux applications or bash to know whats happening to cause this.
- eesmith 7y agoYour shell has a built-in "time" command. man bash: If the time reserved word precedes a pipeline, the elapsed as well as user and system time consumed by its execution are reported when the pipeline terminates. man time: Some shells may provide a builtin time command which is similar or identical to this utility. Consult the builtin(1) manual page.
- dtwwtd 7y agoThis is very likely because without the full path your shell is using the `time` builtin function of your shell as opposed to using the binary. The shell's builtin keyword for `time` is more limited in nature than the full `time` binary. This is true of a number of other common unix commands as well, e.g. `echo`. The manpage for your shell should describe the builtins functions.
- amypinka 7y agoThe full path calls a GNU tool, the other calls your shell's builtin function.
- inimino 7y agoYou can also type `type time` to see that time is a builtin. `which` and `hash` may also be interesting.
- deleted 7y ago[deleted]
- tuldia 7y agoYou can also use: \time -v ls to skip the builtin version.