Alibaba Cloud Disk CLI. Alibaba Cloud Disk command line client that imitates Linux shell file processing commands, supports JavaScript plug-ins, supports synchronization backup functions, and supports batch downloads of photo albums.
Multi-platform support, supports Windows, macOS, linux(x86/x64/arm), android, iOS, etc.
Alibaba cloud disk multi-user support
Supports synchronized disks and seamless switching of resource libraries
Download files from the network disk, support downloading of multiple files or directories, support resumed downloads and parallel downloading of single files. Supports soft link (symbolic link) files.
Upload local files, support multiple file or directory uploads, and support the function of excluding specified folders/files (regular expression). Supports soft link (symbolic link) files.
The synchronous backup function supports backing up local files to cloud disk, backing up cloud disk files to local, and two-way synchronous backup to keep local files and network disk files synchronized. It is often used in embedded or NAS devices and supports docker image deployment.
Command and file path input supports automatic completion of the Tab key, and the path supports wildcard matching mode.
Supports JavaScript plug-ins, you can customize the behavior of key steps in uploading/downloading according to your own needs, to meet your personalized needs to the greatest extent
Supports operations related to personal photo albums, and supports batch downloading of all photos and video files in the photo album locally.
It supports multi-user joint download function. Users who have the ultimate pursuit of download speed can try this option. For details, please view the document Multi-user Joint Download
about
feature
Table of contents
How to install
sync disk
Direct download and installation
apt installation
yum installation
brew installation
winget installation
docker installation
How to use
Modify configuration directory
Start the program
View help
Log in
Switch network disk
View file list
Download file
Upload files
Sync backup files
Basic use
More commands
FAQ
first step
Step 2
How to enable Debug debug log
How to log out and offline the client
Exchange feedback
Acknowledgments
You can download the installation package directly from the release page of this warehouse and use it after decompression.
Pay special attention to the labels of the installation package. Different labels correspond to systems with different architectures. The label descriptions of relevant version files are as follows:
arm / armv5 / armv7: suitable for 32-bit ARM systems
arm64: suitable for 64-bit ARM systems
386/x86: Suitable for 32-bit systems, including Intel and AMD CPU systems
amd64/x64: Suitable for 64-bit systems, including Intel and AMD CPU systems
mips: CPUs that are suitable for the MIPS instruction set, such as the system that won the bid for Kirin. MIPS should pay attention to the different versions corresponding to different endian word orders.
macOS amd64 is suitable for Intel CPU machines. macOS arm64 is currently mainly suitable for machines with Apple M series chips.
iOS arm64 is suitable for iPhone phones and must be jailbroken to run properly.
loong64: Suitable for machines with LoongArch64 architecture, such as domestic Loongson CPU
Reference example:
wget https://github.com/tickstep/aliyunpan/releases/download/v0.3.4/aliyunpan-v0.3.4-linux-amd64.zip unzip aliyunpan-v0.3.4-linux-amd64.zipcd aliyunpan-v0.3.4-linux-amd64 ./aliyunpan
Suitable for systems with apt package manager, such as Ubuntu, domestic deepin operating system, etc. Currently only machines with amd64 and arm64 architectures are supported.
sudo curl -fsSL http://file.tickstep.com/apt/pgp | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/tickstep-packages-archive-keyring.gpg > /dev/null && echo "deb [signed-by=/etc/apt/trusted.gpg.d/tickstep-packages-archive-keyring.gpg arch=amd64,arm64] http://file.tickstep.com/apt aliyunpan main" | sudo tee /etc/apt/sources.list.d/tickstep-aliyunpan.list > /dev/null && sudo apt-get update && sudo apt-get install -y aliyunpan
Suitable for systems with yum package manager, such as CentOS, RockyLinux, etc. Currently only machines with amd64 and arm64 architectures are supported.
sudo curl -fsSL http://file.tickstep.com/rpm/aliyunpan/aliyunpan.repo | sudo tee /etc/yum.repos.d/tickstep-aliyunpan.repo > /dev/null && sudo yum install aliyunpan -y
Systems suitable for the brew package manager, mainly Apple macOS systems. Currently only amd64 and arm64 architecture (Apple Silicon) machines are supported.
brew install aliyunpan
Since brew is installed under the system directory by default, the configuration file is also stored in the system directory by default. It is recommended to set system variables to store the configuration file separately, for example
export ALIYUNPAN_CONFIG_DIR=/Users/tickstep/Applications/adrive/config
winget package manager for Windows systems. Currently only x86 and x64 architecture machines are supported.
Update source (optional)
winget source update
Install
winget install tickstep.aliyunpan --silent
The synchronous backup function supports two modes: backing up local files to cloud disk and backing up cloud disk files to local. Supports JavaScript plug-in to filter backup files. The backup function supports the following modes:
Back up local files, that is, upload local files to the network disk, and always keep a complete backup of local files on the network disk.
Back up cloud disk files, that is, download network disk files to the local, and always keep a complete backup of the network disk files locally.
The backup function supports specifying backup strategies:
exclusive, exclusive backup file (one-to-one mirror backup), redundant files in the target directory will be deleted. Ensure that the source directory of the backup is backed up one-to-one with the target directory files. If the source directory file is deleted, the corresponding target directory file will also be deleted.
increment, incremental backup file, redundant files in the target directory will not be deleted. Only modified files and new files in the source directory will be backed up to the target directory. If files are deleted from the source directory or other files are added to the target directory, they will not be deleted.
The basic logic of synchronization is as follows. A cycle includes: scanning - comparison - execution, a total of three links.
docker run -d --name=aliyunpan-sync --restart=always -v ":/home/app/config/aliyunpan_config.json" -v " :/home/app/data" -e ALIYUNPAN_PAN_DIR=" " -e ALIYUNPAN_SYNC_MODE="upload" -e ALIYUNPAN_SYNC_POLICY="increment" -e ALIYUNPAN_SYNC_DRIVE="backup" -e ALIYUNPAN_SYNC_LOG="true" tickstep/aliyunpan-sync:v0.3.4 : 用户已经登录成功并保存好的aliyunpan_config.json凭据文件 :本地目标目录,绝对路径,例如:/tickstep/Documents/设计文档 ALIYUNPAN_PAN_DIR:云盘目标目录,绝对路径 ALIYUNPAN_SYNC_MODE:备份模式,支持: upload(备份本地文件到云盘),download(备份云盘文件到本地) ALIYUNPAN_SYNC_POLICY:备份策略,支持:exclusive(排他备份文件,目标目录多余的文件会被删除),increment(增量备份文件,目标目录多余的文件不会被删除) ALIYUNPAN_SYNC_DRIVE: 网盘,支持:backup(备份盘), resource(资源盘) ALIYUNPAN_SYNC_LOG: 同步日志,true-开启同步日志显示,false-关闭同步日志
Please see docker-compose startup method: docker-compose.yml
For more detailed documentation, please refer to the dockerhub website: tickstep/aliyunpan-sync
For complete and detailed command instructions, please see the manual: Command Manual
Windows programs should be run from Command Prompt or PowerShell.
You can also directly double-click the program to run it. For specific usage, please refer to the command list and instructions.
Linux / macOS programs should be run in Terminal.
For specific usage, please refer to the command list and instructions.
If the program outputs garbled characters when running, please check whether the encoding method of the terminal is UTF-8
.
If you run the program without any parameters, the program will enter the CLI interactive mode that simulates the Linux shell system user interface, and you can directly run relevant commands.
In interactive mode, the prefix of the line where the cursor is located should be aliyunpan >
. If the account is logged in, the format is aliyunpan:<工作目录> <用户昵称>$
The program has built-in instructions for the relevant commands. You can get the instructions for the commands by running命令-h
. For example: upload -h
to get the instructions for the upload command.
This program supports most command operations on Alibaba Cloud Disk. Here we only introduce the basic usage. For more detailed commands, please see the manual: Command Manual.
You can specify the storage path of the program configuration file. If not specified, the program will use the default directory.
The method is to set the environment variable ALIYUNPAN_CONFIG_DIR
and specify an existing directory. For example, under Linux, you can specify it like this
export ALIYUNPAN_CONFIG_DIR=/home/tickstep/tools/aliyunpan/config
Start directly into the interactive command line
[tickstep@MacPro ~]$ aliyunpan Tip: Use the up and down arrow keys to switch between historical commands. Tip: Ctrl + A / E Jump to the beginning / end of the command. Tip: Type help for help. aliyunpan>
aliyunpan > help... Alibaba Cloud Disk: album, abm photo album (Beta) cd switch working directory download, d download file/directory ls, l, ll list directory mkdir create directory mv move file/directory pwd output working directory recycle recycle bin rename rename file rm delete file/ Directory share shares files/directories sync synchronization backup function upload, u uploads files/directories...
You need to log in first. If you have already logged in, you can skip this step. Login is done through the browser and you need to log in twice.
aliyunpan > login Please open the following link in your browser to log in. The link is valid for 5 minutes. Note: You need to log in twice, once for authorization and once for scanning the QR code. https://openapi.alipan.com/oauth/authorize?client_id=cf9f70e8fc61430f8ec5ab5cadf31375&redirect_uri=https%3A%2F%2Fapi.tickstep.com%2Fauth%2Ftickstep%2Faliyunpan%2Ftoken%2Fopenapi%2F8206f0.....fb5db6b4033 6%2Fauth&scope= user:base,file:all:read,file:all:write Alibaba cloud disk login successful: tickstep aliyunpan:/ tickstep$
Supports switching backup disks and resource libraries, and works under the backup disk by default.
aliyunpan:/ tickstep (backup disk) $ drive # DRIVE ID network disk name 1 11519221 backup disk 2 1311893110 Resource Library Enter the network disk to be switched # Value > 2Switch to network disk: Resource Library aliyunpan:/tickstep(resource library)$
aliyunpan:/ tickstep$ ls # File size Modification date File (directory) 0 - 2021-11-03 13:32:22 Temporary/ 1 - 2021-07-10 07:44:34 Friends’ sharing/ 2 - 2021-07-09 22:11:22 My project/ 3 - 2021-07-09 22:10:37 My games/ 4 - 2021-07-09 22:10:10 My Documents/ 5 349.86KB 2021-06-06 11:46:02 Usage statistics.xls 6 503.57KB 2021-06-06 11:46:02 IMG_0098.JPG 7 72.20KB 2021-06-06 11:46:02 IMG_0103.PNG Total: 3.20MB Total files: 3, Total directories: 7 ----
The directory where downloaded files are saved can be customized through aliyunpan config set -savedir
.
aliyunpan:/ tickstep$ download IMG_0106.JPG [0] The current maximum number of concurrent file downloads is: 5, and the download cache is: 64.00KB [1] Add to download queue: /IMG_0106.JPG [1]---- File ID: 60bc44f855814e19692a4958b4a8823a1a06e5de File name: IMG_0106.JPG File type: File File path: /IMG_0106.JPG [1] Ready to download: /IMG_0106.JPG [1] Will be downloaded to the path: /root/Downloads/4d001d48564f43b..62874f04bbe6/IMG_0106.JPG [1] Download starts[1] ↓ 704.00KB/1.48MB 0B/s(1.69MB/s) in 1.88s, left - ............ [1] Download completed, save location: /root/Downloads/4d001d48564f43b..62874f04bbe6/IMG_0106.JPG [1] File validity verification successful: /root/Downloads/4d001d48564f43b..62874f04bbe6/IMG_0106.JPG Download ends, time: 4 seconds, total data size: 1.48MB aliyunpan:/ tickstep$
aliyunpan:/ tickstep$ upload /Users/tickstep/Downloads/apt.zip /tmp [0] The current maximum concurrent file upload is: 10, and the upload fragment size is: 10.00MB [1] Join the upload queue: /Users/tickstep/Downloads/apt.zip [1] 2022-08-13 13:41:22 Prepare to upload: /Users/tickstep/Downloads/apt.zip => /tmp/apt.zip [1] 2022-08-13 13:41:22 Detecting and creating cloud disk folder: /tmp [1] 2022-08-13 13:41:22 Calculating file SHA1: /Users/tickstep/Downloads/apt.zip [1] 2022-08-13 13:41:22 Detection of second pass, please wait... [1] 2022-08-13 13:41:22 Second transfer failed, file upload started normally [1] ↑ 21.00MB/21.00MB 702.53KB/s(702.70KB/s) in 15s..... .... [1] 2022-08-13 13:41:22 File uploaded successfully, saved to network disk path: /tmp/apt.zip [1] 2022-08-13 13:41:22 File upload result: Success! It took 18 seconds to upload, time: 18 seconds, total data size: 21.00MB
The synchronous backup function supports three modes: backing up local files to cloud disk, backing up cloud disk files to local, and two-way synchronous backup. Supports JavaScript plug-in to filter backup files.
For example: Upload the file backup in the local directory /tickstep/Documents/设计文档
to the cloud disk directory /备份盘/我的文档
aliyunpan:/ tickstep$ sync start -ldir "/tickstep/Documents/Design Documents" -pdir "/Backup Disk/My Documents" -mode "upload" -drive "backup" Start the synchronization backup process to backup the configuration file: (Use command line configuration) Link Type: Default Link Download Concurrency: 2 Upload concurrency: 2 Download fragment size: 1.00MB Upload fragment size: 10.00MB Start synchronization task task: Design document (de3d6b69a607497b73624bcca0845f19) Synchronous mode: Back up local files (upload only) Local directory: /tickstep/Documents/Design documents cloud disk directory: /Backup disk/My Documents
For more detailed commands, please see the manual: Command Manual.
When you need to locate a problem or capture the log when submitting an issue, you need to enable the debug log. The steps are as follows:
Linux&MacOS
Run from command line
export ALIYUNPAN_VERBOSE=1
Windows
Different versions will be slightly different, please check the specific method setting diagram as follows:
Open the aliyunpan command line program. Any cloud disk command will have log output similar to the following.
A single Alibaba Cloud Disk account only allows a maximum of 10 devices to be logged in at the same time. When this prompt appears: Your account has exceeded the maximum number of logged-in devices. Please log off one device first, and then restart the application before you can continue to use your account to log in to customers. The number of clients has been exceeded. You need to log out of other clients before you can continue to use them, as shown below
APP mobile version
Web page