[X-Unix] Monitoring file usage and emailing based on changes
Juan Manuel Palacios
jmpalaciosp at eml.cc
Mon Mar 29 09:24:42 PST 2004
On Mar 29, 2004, at 10:29 AM, David Haines wrote:
> Thanks (!)
> The idea is to check for any changed files (new files or updated files)
> within any / all Ftp user folders (in this instance, perhaps 20-30).
> And
> then send an email to one person (the Ftp server admin) based on the
> findings.
>
> Of course now I have problem testing the -newerct flag/argument...
> The reply is find: illegal option -- n and so on for each letter in
> "newerct" ... I am sure it's and ID10T error on my end
This is typical find(1) behavior when you forget to provide a search
path as a first argument. For instance:
$[juan at PowerBook: juan](360/0,0)-> find -type d
find: illegal option -- t
find: illegal option -- y
find: illegal option -- p
find: illegal option -- e
find: d: No such file or directory
But if I provide a path:
$[juan at PowerBook: Guides](368/0,0)-> find . -type d
.
./TeXPresentations
./TeXPresentations/Ppower4
./TeXPresentations/Ppower4/Sources
./TeXPresentations/texpower-0.0.8f
./TeXPresentations/texpower-0.0.8f/gallery
Here the path is just the "." right after the command, meaning "search
from here onward". Your command and path would most probably look
something like:
find /<path-to-ftp-root>/<username/ -newerct '24 hours ago'
Both segments enclosed inside the < > must be replaced by the
appropriate respective constructs, of course. On Mac OS X the -print
instruction is hardly ever needed. Hope that helps,...
Juan
More information about the X-Unix
mailing list