Weird with time command verbose option
Jeffrey Walton
noloader at gmail.com
Thu Jul 10 20:05:12 UTC 2025
On Thu, Jul 10, 2025 at 2:59 PM Robert Moskowitz via ubuntu-users
<ubuntu-users at lists.ubuntu.com> wrote:
>
> I use time --verbose in conjunction with rsync a lot, but it has been
> from my Fedora systems. Just now trying it on Ubuntu.
>
> after a bunch of failures, i figured out path is important...
>
> $ time --verbose /usr/bin/ls
> --verbose: command not found
>
> real 0m0.114s
> user 0m0.089s
> sys 0m0.026s
>
> fails.
This fails for me on both Fedora 42 and Ubuntu 22.04. I'm using Bash
shell on both machines.
> $ /usr/bin/time --verbose /usr/bin/ls
> public_html rsync.pswd
>
> real 0m0.002s
> user 0m0.002s
> sys 0m0.001s
>
> works
>
> Is time a bash internal command as well as the external one?
>
> btw, I have been using time --verbose in crontab jobs where full path is
> needed. I was testing out something new and was not bothering with the
> full path and throwing that error....
This seems to work on both Fedora and Ubuntu:
/usr/bin/time --verbose -- /usr/bin/ls
If time is located in a non-standard location (like /opt ?), then the
following should find it:
$(command -v time) --verbose -- /usr/bin/ls
(I'm not sure why someone would update the time program, but I guess
it could happen).
Jeff
More information about the ubuntu-users
mailing list