<p dir="ltr">Did you know you can use tailf instead of tail - f! <br>
</p>
<div class="gmail_quote">On Aug 16, 2014 11:36 PM, "Noel Burton-Krahn" <<a href="mailto:noel@burton-krahn.com">noel@burton-krahn.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi John,<div><br></div><div>I use 'tail -f' to save the output of a program and watch it at the same time:</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>
make >make.out 2>&1 & tail -F make.log</div>
</blockquote><div><br></div><div>Note, Ctrl-C will kill tail, not the make session above. You have to kill make explicitly if you want to stop it:</div><div><br></div><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div>kill %-</div><div><br></div></blockquote></div><div><br></div><br>Sometimes you make want to start a long running program and be able to log in from time to time to see how it's doing. I start it in a screen session:<div>
<br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>screen -d -m -S myscreen tcpdump -veplni host</div></div></blockquote><div><div><br></div>
<div>Then later while it's running I can log in from a different session and check up on it</div></div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>screen -dr myscreen</div>
<div><br></div></blockquote>Or kill it:<div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>screen -X -S myscreen quit</div></blockquote><div><div><br></div><div>HTH</div><div class="gmail_extra">
--</div><div class="gmail_extra">Noel</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 15, 2014 at 3:24 PM, John Blomfield <span dir="ltr"><<a href="mailto:jabfield@shaw.ca" target="_blank">jabfield@shaw.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Here is a snippet from a bash script cron job I run:<br>
<br>
.............<br>
if rsync -avz --delete --exclude=lost+found $SOURCEDIR $DESTDIR 1> $DEBUGLOG 2> $ERRORLOG; then \<br>
..........<br>
<br>
Occasionally, I need to run this script manually in a terminal and would like to see the output in the terminal as well as saving it to the debug and error log files. Any suggestions?<span><font color="#888888"><br>
<br>
-- <br>
John Blomfield<br>
Delivered by Thunderbird Email on Linux OpenSuse-KDE4<br>
<br>
Old John B's Linux Notes <a href="http://www.oldjohnbslinux.wordpress.com" target="_blank">http://www.oldjohnbslinux.<u></u>wordpress.com</a><br>
<br>
<br>
______________________________<u></u>_________________<br>
Discuss mailing list<br>
<a href="mailto:Discuss@vlug.org" target="_blank">Discuss@vlug.org</a><br>
<a href="http://lists.vlug.org/mailman/listinfo/discuss" target="_blank">http://lists.vlug.org/mailman/<u></u>listinfo/discuss</a><br>
</font></span></blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
Discuss mailing list<br>
<a href="mailto:Discuss@vlug.org">Discuss@vlug.org</a><br>
<a href="http://lists.vlug.org/mailman/listinfo/discuss" target="_blank">http://lists.vlug.org/mailman/listinfo/discuss</a><br>
<br></blockquote></div>