Hey,

I've seen other people use this feature before but can anyone tell me how (from ssh terminal) I can open a .txt or .log file and watch it get updated live, for example if another application edits it then i won't have to do anything and it will just update on my terminal window?

Thanks,

Kev

#!/bin/sh
while [ 1 ]
do
    cat $1; sleep 1; clear
done

i swear there is a one word command for this...

not snip, not concat but something similar...

tail has a flag that keeps the file open and updates stdout whenever the file is changed. Do something like

$ tail -f [I]/var/log/my-log[/I]

Cool. I thought tail just displayed the end of a file...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.