Migore
Migore

Reputation: 1497

Time format on zsh

I'm trying to run the command

time -f "\t%E real,\t%U user,\t%S sys" ls -Fs

on my zsh but I get

zsh: command not found: -f

But I got this line of code from the man docs of time.

Is this an issue with zsh?

Upvotes: 7

Views: 3913

Answers (2)

chepner
chepner

Reputation: 531035

The zsh builtin time (as you've figured out by now) doesn't take a -f option; rather, you set the value of the shell parameter TIMEFMT

$ TIMEFMT=$'\t%E real,\t%U user,\t%S sys'
$ time ls -Fs

Upvotes: 7

S M
S M

Reputation: 8165

Try /usr/bin/time -f "\t%E real,\t%U user,\t%S sys" ls -Fs

I found this answer here

Upvotes: 6

Related Questions