APLawrence - Information and Resources for Unix and Linux Systems, Bloggers and the self-employed
RSS Feeds Get APLawrence.com by RSS









Linux Skills Test

Copyright 2004 A.P. Lawrence

Answer


Maybe

If by changes you mean additions to the file, then yes, this will work. But if you are looking for overwrites, then no, it probably won't be useful to you. See http://aplawrence.com/Unixart/watchdir.html for that sort of thing.

You can watch multiple files, each with its own message, by using MAILPATH instead of MAIL. You need to "unset MAIL", and set and export MAILPATH:

unset MAIL
MAILPATH='/tmp/foo/h?"H is changed":/tmp/foo/a?"A has changed"'
export MAILPATH

Comments /Tests/Linux/e0854.html


Add your comments


Next question
Return to Question q0854

My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!


We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.