Closes #1191 # Summary Finally getting around to this mc release - Added docs for enc-c, enc-s3, enc-kms - Some docs are making assumptions around behavior that needs to be fixed _first_ - Drive-by linker fixes Staged: http://192.241.195.202:9000/staging/DOCS-1191/linux/index.html --------- Co-authored-by: Andrea Longo <feorlen@users.noreply.github.com> Co-authored-by: Daryl White <53910321+djwfyi@users.noreply.github.com>
5.3 KiB
mc cat
minio
Table of Contents
mc cat
Syntax
The mc cat
command
concatenates the contents of a file or object to another file or object.
You can also use the command to display the contents of the specified
file or object to STDOUT
. ~mc cat
has similar functionality to
cat
.
EXAMPLE
The following command concatenates the contents of an object on a
MinIO deployment to STDOUT
:
mc cat play/mybucket/myobject.txt
SYNTAX
The mc cat
command
has the following syntax:
mc [GLOBALFLAGS] cat \
[--enc-c "value"] \
[--tail "int"] \
[--rewind] \
[--offset "int"] \
[--version-id "string"] \
[--zip] \
ALIAS [ALIAS ...]
You can also use mc cat
against a local filesystem to produce similar
results to the cat
commandline tool:
Parameters
ALIAS
The alias <alias>
of a MinIO deployment and the full
path to the object. For example:
mc cat myminio/mybucket/myobject.txt
You can specify multiple objects on the same or different MinIO deployment. For example:
mc cat myminio/mybucket/object.txt myminio/myotherbucket/object.txt
For an object on a local filesystem, specify the full path to that object. For example:
mc cat ~/data/object.txt
--offset
Specify an integer that is the number of bytes from which the command offsets the output.
--rewind
--tail
Specify an integer that is the number of bytes from which the command trims the output.
--version-id, vid
--zip
Extracts the contents from a zip file on the source to the remote.
Requires a MinIO deployment as the source ALIAS
.
Global Flags
Examples
View an S3 Object
Use mc cat
to return
the object:
mc cat ALIAS/PATH
- Replace
ALIAS <mc cat ALIAS>
with thealias <mc alias>
of the S3-compatible host. - Replace
PATH <mc cat ALIAS>
with the path to the object on the S3-compatible host.
View an S3 Object at a Point-In-Time
Use mc cat --rewind
to return the object at a specific
point-in-time in the past:
mc cat ALIAS/PATH --rewind DURATION
- Replace
ALIAS <mc cat ALIAS>
with thealias <mc alias>
of the S3-compatible host. - Replace
PATH <mc cat ALIAS>
with the path to the object on the S3-compatible host. - Replace
DURATION <mc cat --rewind>
with the point-in-time in the past at which the command returns the object. For example, specify30d
to return the version of the object 30 days prior to the current date.
View an S3 Object with Specific Version
Use mc cat --version-id
to return a specific version of
the object:
mc cat ALIAS/PATH --version-id VERSION
- Replace
ALIAS <mc cat ALIAS>
with thealias <mc alias>
of the S3-compatible host. - Replace
PATH <mc cat ALIAS>
with the path to the object on the S3-compatible host. - Replace
VERSION <mc cat --version-id>
with the specific version of the object to return.