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 [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message

Reply via email to