I was recently looking into using
tail -f to monitor some text files like so:
tail -f /var/sometext However, when I did some testing, it doesn't seem to work. What I did was I created a new file and ran:
tail -f /home/name/text Then, I opened the log in vim and did some editing, saved it, and it seems that tail is not "seeing" the change.
The weird thing is, running
echo "hello" >> /home/name/text seems to work fine (tail sees the change). I read somewhere this has something to do with file descriptors and new inodes being created when saving a file. Can someone explain this for me? I didn't quite get how this actually works but I have an idea what file descriptors are though. Thanks!