LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   cat file but don't quit (https://www.linuxquestions.org/questions/linux-software-2/cat-file-but-dont-quit-477472/)

Ephracis 08-26-2006 12:34 AM

cat file but don't quit
 
I am having a problem. I want to read a file, just like when using cat, but I want to keep waiting for a new line instead of quitting when it reaches the end of the file. Or if anyone has any better idea of how to print out all the content of a logfile to stdout as the new entries in the logfile appear.

Hope I made myself clear enough.

gilead 08-26-2006 12:46 AM

Have a look at man tail - it should do what you want. For example, the following will open a log file and leave the output waiting for new lines from the log:
Code:

tail -f /var/log/messages

Ephracis 08-26-2006 12:56 AM

Thanks! :D


All times are GMT -5. The time now is 03:08 PM.