I know many questions have been asked/answered about the time command, but mine still seems to be not working. I have been doing like everyone suggests, and using /usr/bin/time, which seems to work, but every time I trying using /usr/bin/time -v or /usr/bin/time -verbose, it spits out an error saying /usr/bin/time: illegal option -- vusage: time [-lp] command.In an ideal world, I would have used tstime, but that's not working either as it says tstime: command not found. My bash is 3.2. I'm just really not sure what's going on...
/usr/bin/time command -v not working
time
Mac OS X doesn't ship with the GNU stack. You have BSD Time time.c,v 1.9. You can verify this by typing:strings /usr/bin/time | grep c,vBSD time doesn't support --verbose, but it does support /usr/bin/time -lp:$ /usr/bin/time -lp echo hihireal         0.02user         0.00sys          0.00    700416  maximum resident set size         0  average shared memory size         0  average unshared data size         0  average unshared stack size       174  page reclaims         6  page faults         0  swaps         7  block input operations         1  block output operations         0  messages sent         0  messages received         0  signals received         9  voluntary context switches         1  involuntary context switches$Which seems to provide a lot of the output that GNU time provides with --verbose:ubuntu@sandbox:~$ /usr/bin/time --verbose echo hihi    Command being timed: echo hi    User time (seconds): 0.00    System time (seconds): 0.00    Percent of CPU this job got: 66%    Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.00    Average shared text size (kbytes): 0    Average unshared data size (kbytes): 0    Average stack size (kbytes): 0    Average total size (kbytes): 0    Maximum resident set size (kbytes): 1804    Average resident set size (kbytes): 0    Major (requiring I/O) page faults: 0    Minor (reclaiming a frame) page faults: 78    Voluntary context switches: 1    Involuntary context switches: 3    Swaps: 0    File system inputs: 0    File system outputs: 0    Socket messages sent: 0    Socket messages received: 0    Signals delivered: 0    Page size (bytes): 4096    Exit status: 0ubuntu@sandbox:~$If you really want --verbose, you can install GNU time with Homebrew:$ brew install gnu-time==> Downloading https://homebrew.bintray.com/bottles/gnu-time-1.7.yosemite.bottle.1.tar.gz######################################################################## 100.0%==> Pouring gnu-time-1.7.yosemite.bottle.1.tar.gz  /usr/local/Cellar/gnu-time/1.7: 8 files, 80K$ gtime --verbose echo hihi    Command being timed: echo hi    User time (seconds): 0.00    System time (seconds): 0.00    Percent of CPU this job got: 16%    Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.00    Average shared text size (kbytes): 0    Average unshared data size (kbytes): 0    Average stack size (kbytes): 0    Average total size (kbytes): 0    Maximum resident set size (kbytes): 2785280    Average resident set size (kbytes): 0    Major (requiring I/O) page faults: 6    Minor (reclaiming a frame) page faults: 279    Voluntary context switches: 2    Involuntary context switches: 6    Swaps: 0    File system inputs: 1    File system outputs: 0    Socket messages sent: 0    Socket messages received: 0    Signals delivered: 0    Page size (bytes): 4096    Exit status: 0