Click to See Complete Forum and Search --> : samba and tail


Cerf
03-01-2005, 05:32 PM
Hey,

Every once and awhile I log into my server and check the status of FOH to make sure that it is sill processing. What I want to do is share the file, but not the whole file. When I open this file using my Windows XP computer (via samba) I only wany it to display the tail (last 10 lines) of the file.

Is there any way to do this without using any additional software?

I thinking something similar to the affect of the proc file system

techwise
03-02-2005, 12:49 AM
why not just have the server send you a log file (via mail or placing the file in your smb share) to show you the process progress. Whatever time interval you like.


Mike

Cerf
03-02-2005, 05:15 PM
Originally posted by techwise
why not just have the server send you a log file (via mail or placing the file in your smb share) to show you the process progress. Whatever time interval you like.


Mike

That could be accomplished with something like a cron job, correct?

techwise
03-02-2005, 11:49 PM
indeed, a very simple one liner crontab entry to "cp" that file or mail that file to you at set intervals.

Then if you want to get fancy you could have the process restarted if it were to die.

mike

retsaw
03-03-2005, 03:56 AM
I think it would be prefered to use the cron job to run tail and output that to a file on a samba share e.g. "tail /path/to/FAHlog.txt >/mnt/smbshare/FAHlog.txt" would then just place the end of the logfile on the samba share.