home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sun.admin
- Path: sparky!uunet!inmos!inmos.co.uk!brwal!hughm
- From: hughm@brwal.inmos.co.uk (Hugh McIntyre)
- Subject: Re: Help with FIND in shell script
- Message-ID: <1993Jan28.133428.20422@inmos.co.uk>
- Sender: news@inmos.co.uk
- Organization: INMOS Limited, Bristol, UK
- References: <1k4gp8INN8ei@darkstar.UCSC.EDU>
- Date: Thu, 28 Jan 1993 13:34:28 GMT
- Lines: 34
-
- In article <1k4gp8INN8ei@darkstar.UCSC.EDU>, stephen@orchid.UCSC.EDU (coram populo) writes:
- |> Can someone give me an idea on how to make the find command use
- |> the {} in the -exec usage.
- |>
- |> For example, I want to mail users automagically when their mail
- |> in the system spool is over a particular size.
-
- Sounds like a good way to fill up the filesystem if they don't read their mail
- since the mailbox will just keep getting bigger and bigger every time a warning
- message is added ...
-
- |> e.g. as I wrote it -
- |>
- |> find * -size 100000c -exec mail {} < ./mailmessage \;
- |>
- |> But this does not work- it never finds the < ./mailmessage part.
-
- You may need a script mailwarn, eg:
-
- -------------------------------
- #! /bin/sh
- #
- mail $* < ./mailmessage $1
- -------------------------------
-
- find * -size 100000c -exec ./mailwarn {} \;
-
- |> Thanks in advance for suggestions etc.
- |>
- |> Stephen Hauskins
- |> UCSC
-
- Hugh McIntyre.
- INMOS, Bristol, UK.
-