- ظاهرا داستان متفاوته با چیزی که شما فکر میکنی.
You can tell tail -f to terminate after a specific process id terminates with the –pid= flag:
tail -f –pid=2357 /var/log/http/host.log
When the process with the process id of 2357 terminates the tail command will also terminate. You can delay pid checks with the -s option and instead of controlling the output interval -s will control how often the process check is made:
- لینک (http://www.linuxintheshell.org/2012/07/31/episode-012-tail/)
- من اگه بخوام از دو تا ترمینال ی چیزی رو نگاه کنم میریزم توی یک فایل تمام خروجی ها رو و از توی ترمینال هام tail -f میکنم.