SHARE
Facebook X Pinterest WhatsApp

Problem with continuous monitoring of files with tail command

Written By
thumbnail
Web Webster
Web Webster
Dec 29, 2009

[ Thanks to An Anonymous Reader for
this link. ]

“If you can’t get tail command to continuously
monitor a file, then read on. I was working on a script yesterday,
a part of which depended on continuous monitoring of a text file. I
had used our trusty old “tail” command for this but
while testing by manually putting in some data into the file, it
was failing but curiously it was working fine when used in actual
scenario. Befuddled, I did a simple test. I created a simple text
file “a.txt” with a few lines of data and then ran the
following command:

“…It showed the last few lines of the file and kept waiting.
So far so good. Then I opened the file in vim editor, wrote a few
more lines, saved the file and then waited but nothing in the
window that was running the tail command. Thinking that the data
might be buffered and not flushed to the disc yet, I ran the sync
command but still nothing.”


Complete Story

thumbnail
Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Recommended for you...

Red Hat reveals major enhancements to Red Hat Enterprise Linux AI
sjvn
Oct 22, 2024
How to Find AWS EC2 Instance Type Over SSH (6 Methods)
Benny Lanco
Sep 23, 2024
Crond: Daemon to Execute Scheduled Commands
Rose Hosting Blog
Sep 20, 2024
A Detailed Introduction to Oracle VirtualBox
Senthil Kumar
Sep 19, 2024
Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.