Table of Contents
You can also use
mc watch against a local filesystem directory to
produce similar results to running
inotify -e modify,create,delete,move command.
The following command watches for
events on any object or prefix in the
mydata bucket on the
myminio MinIO deployment:
mc watch --recursive myminio/mydata
The command has the following syntax:
mc [GLOBALFLAGS] watch \ [--event "string"] \ [--prefix "string"] \ [--recursive] \ [--suffix "string"] \ ALIAS
indicate optional parameters.
Parameters sharing a line are mutually dependent.
Parameters seperated using the pipe
|operator are mutually exclusive.
Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.
Required The alias of a MinIO deployment and the full path to the bucket to watch for configured events. For example:
mc tree myminio/mybucket
The event(s) to watch for. Specify multiple events using a comma
,delimiter. See Supported Bucket Events for supported events.
The bucket prefix in which to watch for the specified
- --recursive, r
Recursively watch for events in the specified
ALIASbucket path or local directory.
Enables JSON lines formatted output to the console.
mc --JSON COMMAND
mc watch --recursive ALIAS/PATH
The mc commandline tool is built for compatibility with the AWS S3 API and is tested MinIO and AWS S3 for expected functionality and behavior.
MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.