From owner-freebsd-questions Wed Feb 6 13:40:12 2002 Delivered-To: freebsd-questions@freebsd.org Received: from bingnet2.cc.binghamton.edu (bingnet2.cc.binghamton.edu [128.226.1.18]) by hub.freebsd.org (Postfix) with ESMTP id 71E1537B421 for ; Wed, 6 Feb 2002 13:40:01 -0800 (PST) Received: from opal (cs.binghamton.edu [128.226.123.101]) by bingnet2.cc.binghamton.edu (8.11.6/8.11.6) with ESMTP id g16Ldu123998; Wed, 6 Feb 2002 16:39:56 -0500 (EST) Date: Wed, 6 Feb 2002 16:39:56 -0500 (EST) From: Zhihui Zhang X-Sender: zzhang@opal To: Dan Nelson Cc: freebsd-questions@FreeBSD.ORG Subject: Re: time usage question In-Reply-To: <20020206213251.GJ1066@dan.emsphone.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Thanks. I have found a workaround (tell me if I am wrong): $ cat mycommand ls | xargs rm $ time mycommand -Zhihui On Wed, 6 Feb 2002, Dan Nelson wrote: > 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 > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message