[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [BASH] "true" wenn Datei älter als 2 std.



Moinmoin!

On Fri, May 07, 2004 at 10:28:01AM +0200, Michelle Konzack wrote:
> if [ -f /var/run/script.pid ] && \
>    [ `find -name /var/run/script.pid -amin 60` ] ; then
>     ...
>     ...
> fi

Aus man find:
|   TESTS
|       Numeric arguments can be specified as
|
|       +n     for greater than n,
|
|       -n     for less than n,
|
|       n      for exactly n.
|
|       -amin n
|              File was last accessed n minutes ago.

Das kleine »+« macht hier einen großen Unterschied... ;)

Gruß,
Flo

Attachment: signature.asc
Description: Digital signature


Reply to: