当您需要快速上传大文件、下载文件、删除固定前缀文件时,可以使用ossutil工具。ossutil支持在Windows、Linux、macOS等系统中运行,您可以根据实际环境下载和安装合适的版本。
版本
当前版本:2.0.0-beta.06261100
下载ossutil
下载地址 | SHA256校验和 |
02b002f51d3019adcb7cf8929b1806c0909b077c4e494af8215737dd6663aeaf | |
8ad6fb9787ff25023f67a190007a7e930310927ca3cf4f0a5ee4009491e74b9d | |
8e8bc5b46e74f2f4e495cba7e5dc57e5164cef566795c195e12df9a1e8905012 | |
45968a19d4c2844319a18f555db8a0d484e5afb056a4c470bdd868967cb0c074 | |
4ab59f6db90a619216e59fb07c0fd122b15fa0d2548ab1d39c729e1cee0206b6 | |
cb29a5eaa6e17e8b7b65de21b1dc2ffe096da71dd160359677acdfa8cc1c3136 | |
e14af6191074b9e06ee3b5675653a5cd97266e23200635dcb5f0b7bf5ce75b0d | |
dff1056db91a6029982fd67955528f07bad3476bbd6c0f6941783f45a4a210e4 |
安装ossutil
Linux
安装ossutil。
下载ossutil压缩包。
curl https://gosspublic.alicdn.com/ossutil/v2-beta/2.0.0-beta.06261100/ossutil-2.0.0-beta.06261100-linux-amd64.zip -o ossutil-2.0.0-beta.06261100-linux-amd64.zip
说明此处以Linux x86 64bit为例进行介绍。其他系统下载地址,请参见下载ossutil。
在软件包所在目录,执行以下解压命令。
unzip ossutil-2.0.0-beta.06261100-linux-amd64.zip
进入所在目录,执行以下命令。
chmod 755 ossutil
继续在目录中执行以下命令, 如果能返回版本号,说明安装成功。
ossutil version
配置ossutil。
输入配置命令。
ossutil config
根据提示设置配置文件路径。
Please enter the config file name,the file name can include path(default /root/.ossutilconfig, carriage return will use the default file. If you specified this option to other file, you should specify --config-file option to the file when you use other commands):
ossutil默认使用~/.ossutilconfig作为配置文件,若您设置了配置文件的路径,则每次使用命令时需增加-c选项指定配置文件。例如配置文件保存为/home/config,使用ls时,命令格式如下:
ossutil ls oss://examplebucket -c /home/config
根据提示设置工具的语言。请输入语言
CH
或EN
。工具使用的语言默认与操作系统保持一致。该配置项将在此次config命令设置成功后生效。根据提示分别设置Endpoint、AccessKey ID、AccessKey Secret等信息。关于配置文件的更多信息,请参见配置文件设置。
验证是否已成功安装ossutil。
ossutil
如果屏幕中输出ossutil所有支持的命令,表明已成功安装ossutil。
Windows
安装ossutil。
解压已下载的Windows安装包。
在命令行中进入安装包所在路径。
配置ossutil。
输入配置命令。
ossutil config
根据提示设置配置文件路径。
Please enter the config file name,the file name can include path(default "C:\Users\issuser\.ossutilconfig", carriage return will use the default file. If you specified this option to other file, you should specify --config-file option to the file when you use other commands):
ossutil默认使用~\.ossutilconfig作为配置文件,若您设置了配置文件的路径,则每次使用命令时需增加-c选项指定配置文件。例如配置文件保存为c:\ossutil\config,使用ls时,命令格式如下:
ossutil ls oss://examplebucket -c c:\ossutil\config
根据提示分别设置AccessKey ID、AccessKey Secret和Region参数。关于配置文件的更多信息,请参见配置文件设置。
验证是否已成功安装ossutil。
ossutil
如果屏幕中输出ossutil所有支持的命令,表明已成功安装ossutil。
macOS
安装ossutil。
下载ossutil压缩包。
curl -o ossutil-2.0.0-beta.06261100-mac-arm64.zip https://gosspublic.alicdn.com/ossutil/v2-beta/2.0.0-beta.06261100/ossutil-2.0.0-beta.06261100-mac-arm64.zip
说明此处以macOS ARM 64bit为例进行介绍。其他系统下载地址,请参见下载ossutil。
在软件包所在目录,执行以下解压命令。
unzip ossutil-2.0.0-beta.06261100-mac-arm64.zip
进入所在目录,执行以下命令。
chmod 755 ossutil
继续在目录中执行以下命令,如果能返回版本号,说明安装成功。
ossutil version
配置ossutil。
输入配置命令。
ossutil config
根据提示设置配置文件路径。
Please enter the config file name,the file name can include path(default "/Users/user/.ossutilconfig", carriage return will use the default file. If you specified this option to other file, you should specify --config-file option to the file when you use other commands):
ossutil默认使用~/.ossutilconfig作为配置文件,若您设置了配置文件的路径,则每次使用命令时需增加-c选项指定配置文件。例如配置文件保存为/home/config,使用ls时,命令格式如下:
ossutil ls oss://examplebucket -c /home/config
根据提示设置工具的语言。请输入语言
CH
或EN
。工具使用的语言默认与操作系统保持一致。该配置项将在此次config命令设置成功后生效。根据提示分别设置Endpoint、AccessKey ID、AccessKey Secret等参数。关于配置文件的更多信息,请参见配置文件设置。
验证是否已成功安装ossutil。
ossutil
如果屏幕中输出ossutil所有支持的命令,表明已成功安装ossutil。