Date: Wed, 6 Feb 2002 15:32:51 -0600 From: Dan Nelson <dnelson@allantgroup.com> To: Zhihui Zhang <zzhang@cs.binghamton.edu> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: time usage question Message-ID: <20020206213251.GJ1066@dan.emsphone.com> In-Reply-To: <Pine.SOL.4.21.0202061616300.9461-100000@opal> References: <Pine.SOL.4.21.0202061616300.9461-100000@opal>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Feb 06), Zhihui Zhang said: > > I often use something like: > > $ time command > > Now the command is a complex one, like "ls | xargs rm". Can I still use > the same format. For example, > > $ time ls | xargs rm Depends on your shell. zsh will time each command in the pipeline separately: zsh> time ls | wc -l | wc -l 1 ls 0.00s user 0.04s system 54% cpu 0.071 total wc -l 0.00s user 0.02s system 26% cpu 0.059 total wc -l 0.00s user 0.01s system 14% cpu 0.053 total Most other shells will time only the first command. -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020206213251.GJ1066>