From owner-freebsd-questions Wed Feb 6 13:33: 0 2002 Delivered-To: freebsd-questions@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id B4E5537B429 for ; Wed, 6 Feb 2002 13:32:54 -0800 (PST) Received: (from dan@localhost) by dan.emsphone.com (8.11.6/8.11.6) id g16LWqr44301; Wed, 6 Feb 2002 15:32:52 -0600 (CST) (envelope-from dan) Date: Wed, 6 Feb 2002 15:32:51 -0600 From: Dan Nelson To: Zhihui Zhang Cc: freebsd-questions@FreeBSD.ORG Subject: Re: time usage question Message-ID: <20020206213251.GJ1066@dan.emsphone.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.27i X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error 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 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