On Thu, 27 Apr 2000, Raider wrote about, Re: And something about less:
> First of all I'm very dissapointed in you. Really. Maybe
> it's all my fault. I thought you know something more than what's in
> the usual HOWTOs.
I never said i did, however what you describe is hard to understand in the
terms you use.
> Let me rephrase. With an example. Hopefully this way will
> make some sense.
> There is one file. One log file. It is purged from time to
> time like any other logs. So at one moment it will be zero lenght.
> But it is written. I will browse that log file (text log file to be
> more specific) with less. That (supposedly good piece of software)
> will show a zero lenght file. Everything is all right. But there are
> programs that append to that opened file lines of text. If you will
> give refresh you will receive NOTHING. If the file has some text
> initially, than less will refresh. Else it will just "simulate"
> refresh. Is this clear enough?
Not really, i must be getting to old or you are expecting less to do things
it "cant do".
By cant, i mean,
1) The file being viewed is an open file and will not get appended untill
the file is closed, all changes are in memory and possably a tmp file.
Only after closeing that file will the changes be readable to most all
programs "including less".
2) less does not constanly read a file, it loads the complete file into
memory, so changes to the file being read will NOT be seen by less,
there is the f option (which i have never tyred), the man page says it
works like 'tail -f', but as i see it if the file being read is opened
by another program and constanly being changed, then the appended
text will not be seen.
> Sorry for the rough tone. I really am. But everything falls
You are entiteld to your opinion, mine is, you cant comapre any DOS related
software with linux or any unix based system for that matter, the concepts
are entirly different.
Windows speach snipped.
>
> On "Re: And something about less" Richard Adams said on Apr 27:
> > I dont see what you mean, is not a valid command all it will do on a zreo
> > lenth file is fill the screen with tilde's on the left of the screen, on a
> > lenthy file it does nothing.
>
> Ever thought that file was getting bigger in the background?
Yes exachtly my point, take background as memory, see comment above.
>
> Because there IS a problem. If 10 seconds later something is
> written in that same file, less won't show that. This DOESN'T happen
> if the file is bigger than zero.
I said at the start, less loads a file into memory, if you want to
constanly "monitor" a file thats being constanly appended, use 'tail -f'
you can even go one beter, get syslog to redirect that particular logfile
output to a tty as well as a logfile.
>
> > > But I'm not sure I can pinpoint the problem in the source.
> > > Is there a solution?
> > Jup, hit the "q" for "QUIT"
> > Your screen will return to how it was before you issued 'less filename'
>
> ??? Nice sarcasm. I didn't needed it...
NO not sarcasum, fact, i consider (if i now understabd properly) that you
are expecting a child to do a mans work, by that i mean you are using the
wrong program, why use less, do it another way, there are so many
possablitys.
>
> > > For me it's o sad to discover problems with utilities when I
> > > was so proud of them.
> > I rather think you are creating the problems, i do of course mean that in
> > polite manner.
>
> Yea. Probably. Probably you can't accept you can't solve it.
No one can solve a problem when there is not a problem to solve.
Everyone can create problems and blame it on software which has been in use
for many years by "millions".
>
> > man pine
> > man less
>
> Oh! My goodie... what is man? Is this another pacman game?
I used to say "RTFM"
>
> Raider
> PS: I really disliked your mail. This is another reason for
> the harsh answer. Say you can't solve it. Stop assuming if you are
> unable to understand. And I really didn't need your lame sarcasm.
My mail was not mean to be sarcastic, niether is this one meant to be.
tail -f /var/log/filename > /dev/tty12 (for example)
Or simply use;
tail /var/log/filename (To view the last 10 lines)
tail -n100 /var/log/filename
Or edit /etc/syslog.conf to redirect the logging output for that particular
daemon.
Dont forget to restart syslogd otherwise the changes wont be effective
untill your next reboot.
> --
> ``Liberate tu-temet ex inferis''
--
Regards Richard
[EMAIL PROTECTED]
http://people.zeelandnet.nl/pa3gcu/
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs