From owner-freebsd-questions Sun Jan 28 13:23: 1 2001 Delivered-To: freebsd-questions@freebsd.org Received: from post.mail.nl.demon.net (post-10.mail.nl.demon.net [194.159.73.20]) by hub.freebsd.org (Postfix) with ESMTP id 42DCA37B400; Sun, 28 Jan 2001 13:22:36 -0800 (PST) Received: from [212.238.77.116] (helo=gateway.raggedclown.intra) by post.mail.nl.demon.net with smtp (Exim 3.14 #2) id 14MzHO-0007Zb-00; Sun, 28 Jan 2001 21:22:34 +0000 Received: by buffy.raggedclown.net (Postfix on SuSE Linux 7.0 (i386), from userid 500) id F417312D3D; Sun, 28 Jan 2001 22:18:01 +0100 (CET) Date: Sun, 28 Jan 2001 22:18:01 +0100 From: Cliff Sarginson To: "Justin W. Pauler" Cc: freebsd-questions@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG Subject: Re: tail Message-ID: <20010128221801.A2923@raggedclown.net> References: <01012813255100.83352@gateway.drnet.fais.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <01012813255100.83352@gateway.drnet.fais.net>; from jwpauler@jwpages.com on Sun, Jan 28, 2001 at 01:25:51PM -0600 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, Jan 28, 2001 at 01:25:51PM -0600, Justin W. Pauler wrote: > I am not sure if this is a command, but if not, I think it would be useful. I > have often needed to watch output from different commands like df, but I have > to continously run the command to get the latest amount. I was thinking, why > couldn't tail do that? Since it can watch files for changes and display > those, why not for a command? > > I tried tail -f |df -h and could not get it to update. I would appreciate > your thoughts. > > I am also cc'ing this to stable in cause it is a bug/feature... Mmm.. methinks you are confused ! The command as you tyoed it will have tail read it;s standard input, the terminal, and pipe it's output into df. Since df is not a filter it will ignore it. If it would work then you would need to change it around to "df | tail -f". However df will only execute once, so that won;t do what you want. To repeatedly execute a command put it in a loop: while : do df done If you want it to wait a while put a sleep in it, to space it out put an echo..e.g. while : do df sleep 2 echo done However, on Linux there is a program called "watch" that repeatedly executes a command an displays it on the screen updating the display "in place" .. so it does not scroll away. I am sure there must be a similar program on BSD (I would like to know as well!) but the program named "watch" on FBSD is something different. Cliff To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message