MinIO客户端之head

发布时间 2023-12-16 02:46:06作者: jackieathome

MinIO提供了一个命令行程序mc用于协助用户完成日常的维护、管理类工作。

官方资料


查看对象的前N行内容,N默认为10,命令如下:

./mc head local1/bkt1/docker-compose

控制台的输出,如下:

#!/bin/bash
#
# Run docker-compose in a container
#
# This script will attempt to mirror the host paths by using volumes for the
# following paths:
#   * $(pwd)
#   * $(dirname $COMPOSE_FILE) if it's set
#   * $HOME if it's set
#

查看对象的前25行内容,命令如下:

./mc head --lines 25 local1/bkt1/docker-compose

控制台的输出,如下:

#!/bin/bash
#
# Run docker-compose in a container
#
# This script will attempt to mirror the host paths by using volumes for the
# following paths:
#   * $(pwd)
#   * $(dirname $COMPOSE_FILE) if it's set
#   * $HOME if it's set
#
# You can add additional volumes (or any docker run options) using
# the $COMPOSE_OPTIONS environment variable.
#


set -e

VERSION="1.11.2"
IMAGE="docker/compose:$VERSION"


# Setup options for connecting to docker host
if [ -z "$DOCKER_HOST" ]; then
    DOCKER_HOST="/var/run/docker.sock"
fi