[sclug] Writing files to 2 places at once?
David Given
dg at cowlark.com
Fri Mar 3 17:43:26 UTC 2006
On Friday 03 March 2006 15:57, Sapan Ganguly wrote:
[...]
> I've been thinking along thsese lines, all the filesystems involved are
> journalling (ext3), I've also been reading about FAM (File Access Monitor)
> and IMON (Inode Monitor). I may be barking up the wrong tree but what do
> you all think? Should I be able to use both or one of these tools to let
> Oracle write to its datafiles in the current location and to my new
> location at the same time?
I don't know, but Ye Olde Unixe way of doing these things is to use tee and
tail.
tee writes stdin to a file and also to stdout:
echo 'Hello, world!' | tee file1 | tee file2 | tee file3 > file4
tail -F will watch a file for changes and show them to you:
tail -F logfile
You can combine the two to replicate logs.
tail -F /mnt/oracle/logfile | tee /mnt/anotherdisk/logfile > /dev/tty11
(You don't need to use tee in this case, but I like my logs on virtual
terminals.)
tail -F watches a particular filename. If the file there changes, it'll reopen
it. The more familiar tail -f watches a particular file. If Oracle does log
rotation, tail -f won't work.
Any use to you?
--
+- David Given --McQ-+ "In America, family has become a code word for
| dg at cowlark.com | something that you can put a five-year-old in front
| (dg at tao-group.com) | of and come back secure in the knowledge that your
+- www.cowlark.com --+ child not will not have been exposed to any ideas."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://lists.tmdg.co.uk/pipermail/sclug/attachments/20060303/2e604133/attachment.bin
More information about the Sclug
mailing list