|
Tail would be a shoehorn in OS/400 and /QSYS.LIB since virtually everything is a database file. I think tail should stay in the IFS with "real" stream files. I imagine the predominant use of tail in a unix environment is to watch log files. For instance, I "tail -f /var/log/messages" to see new system messages my Linux system generates. I also "tail -f /home/mysql/log/mysql.log" to see which SQL statements are being processed. Both of these files are text files, and tail gives me the flexibility to view the most recent activity of these files without interrupting my work (break messages). I don't necessarily see much use in tailing a database. On a database, I would rather attach a trigger to it, even though most triggers are tailored to the table in question. Tail is more of a generic tool, and could be considered a "poor man's" trigger in the right circumstances. Could tail be used to monitor when a processes ends? I suppose, but I'd rather have a /var/run/program.pid file. This file contains the process id for a running program. When a program ends normally (not kill -9), the .pid file should be removed automatically. Loyd -----Original Message----- From: Evan Harris [mailto:spanner@ihug.co.nz] Sent: Wednesday, November 20, 2002 12:32 AM To: midrange-l@midrange.com Subject: Re: Question Re: Piping and Redirection <snip> I have run the tail command under qshell and it worked OK although I could not quite imagine a use for it. I am assured by my unix colleagues that it is extremely useful but I confess to not being able to dream of an applicable situation regarding a database file. If I really wanted to know when a process was ended for instance I would submit a job to the job queue to send me either a page or a break message. I am still at a loss as to why it is useful to see records "as they are added" to the database. My mates made exactly the same claim as you BTW and I am no more enlightened as to what benefits this confers. Straighten me out :) Admittedly I was only able to run it on stream files in the IFS - IIRC I got an operation not allowed for type of file or something similar for a database file in /qsys.lib but as I said this makes a certain perverse sense to me. </snip>
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.