Welcome to the upcoming version of the MinIO Documentation! The content on this page is under active development and may change at any time. If you can't find what you're looking for, check our legacy documentation. Thank you for your patience.

mc watch

Description

The mc watch command watches for events on the specified S3-compatible service bucket or local filesystem path. For S3 services, use mc event to configure bucket event notifications on S3-compatible services.

Examples

Watch for Events in a Bucket

mc watch --recursive ALIAS/PATH
  • Replace ALIAS with the alias of the S3-compatible host.

  • Replace PATH with the path to the bucket.

Syntax

watch has the following syntax:

mc watch [FLAGS] TARGET

watch supports the following arguments:

TARGET

Required The S3 service alias and bucket or the local filesystem directory to watch for event notifications. Specify the alias of a configured S3 service as the prefix to the TARGET path. For example:

mc event add play/mybucket
--event

The event(s) to watch for. Specify multiple events using a comma , delimiter. See Supported Bucket Events for supported events.

Defaults to put,delete, get.

--prefix

The bucket prefix in which to watch for the specified --event.

For example, given a TARGET of play/mybucket and a --prefix of photos, only events in play/mybucket/photos trigger bucket notifications.

--suffix

The bucket suffix in which to watch for the specified --event.

For example, given a TARGET of play/mybucket and a --suffix of .jpg, only events in play/mybucket/*.jpg trigger bucket notifications.

--recursive, --r

Recursively watch for events in the specified TARGET bucket path or local directory.