Available Commands: about Get quota information from the remote. authorize Remote authorization. cachestats Print cache stats for a remote cat Concatenates any files and sends them to stdout. check Checks the files in the source and destination match. cleanup Clean up the remote if possible config Enter an interactive configuration session. copy Copy files from source to dest, skipping already copied copyto Copy files from source to dest, skipping already copied copyurl Copy url content to dest. cryptcheck Cryptcheck checks the integrity of a crypted remote. cryptdecode Cryptdecode returns unencrypted file names. dbhashsum Produces a Dropbox hash file for all the objects in the path. dedupe Interactively find duplicate files and delete/rename them. delete Remove the contents of path. deletefile Remove a single file from remote. genautocomplete Output completion script for a given shell. gendocs Output markdown docs for rclone to the directory supplied. hashsum Produces an hashsum file for all the objects in the path. help Show help for rclone commands, flags and backends. link Generate public link to file/folder. listremotes List all the remotes in the config file. ls List the objects in the path with size and path. lsd List all directories/containers/buckets in the path. lsf List directories and objects in remote:path formatted for parsing lsjson List directories and objects in the path in JSON format. lsl List the objects in path with modification time, size and path. md5sum Produces an md5sum file for all the objects in the path. mkdir Make the path if it doesn't already exist. mount Mount the remote as file system on a mountpoint. move Move files from source to dest. moveto Move file or directory from source to dest. ncdu Explore a remote with a text based user interface. obscure Obscure password for use in the rclone.conf purge Remove the path and all of its contents. rc Run a command against a running rclone. rcat Copies standard input to file on remote. rcd Run rclone listening to remote control commands only. rmdir Remove the path if empty. rmdirs Remove empty directories under the path. serve Serve a remote over a protocol. settier Changes storage class/tier of objects in remote. sha1sum Produces an sha1sum file for all the objects in the path. size Prints the total size and number of objects in remote:path. sync Make source and dest identical, modifying destination only. touch Create new file or change file modification time. tree List the contents of the remote in a tree like fashion. version Show the version number.
Use "rclone [command] --help" for more information about a command. Use "rclone help flags" for to see the global flags. Use "rclone help backends" for a list of supported services.
出这么一大溜help信息,说明装好了。
配置Rclone
安装完成后,开始添加挂载
输入rclone config来开始设置
首先添加一个新的挂载
rclone config
创建remote
输入 n 回车 ,新建 remote
1 2 3 4
n) New remote s) Set configuration password q) Quit config n/s/q> n
Google Application Client Id Setting your own is recommended. See https://rclone.org/drive/#making-your-own-client-id for how to create your own. If you leave this blank, it will use an internal key which is low performance. Enter a string value. Press Enter for the default (""). client_id> # 回车 Google Application Client Secret Setting your own is recommended. Enter a string value. Press Enter for the default (""). client_secret> # 回车
选择操作权限
都是自己用的话,直接选1,所有权限
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Scope that rclone should use when requesting access from drive. Enter a string value. Press Enter for the default (""). Choose a number from below, or type in your own value 1 / Full access all files, excluding Application Data Folder. \ "drive" 2 / Read-only access to file metadata and file contents. \ "drive.readonly" / Access to files created by rclone only. 3 | These are visible in the drive website. | File authorization is revoked when the user deauthorizes the app. \ "drive.file" / Allows read and write access to the Application Data folder. 4 | This is not visible in the drive website. \ "drive.appfolder" / Allows read-only access to file metadata but 5 | does not allow any access to read or download file content. \ "drive.metadata.readonly" scope> 1 # 选1 回车
根目录设置
用不到这个设置,直接回车
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
ID of the root folder Leave blank normally.
Fill in to access "Computers" folders (see docs), or for rclone to use a non root folder as its starting point.
Note that if this is blank, the first time rclone runs it will fill it in with the ID of the root folder.
Enter a string value. Press Enter for the default (""). root_folder_id> # 回车 Service Account Credentials JSON file path Leave blank normally. Needed only if you want use SA instead of interactive login. Enter a string value. Press Enter for the default (""). service_account_file> # 回车
设置选项
1 2 3 4 5 6 7 8 9 10 11
Edit advanced config? (y/n) y) Yes n) No (default) y/n> n # 选n Remote config Use auto config? * Say Y if not sure * Say N if you are working on a remote or headless machine y) Yes (default) n) No y/n> n # 这个auto linux 好像用不了了
Please go to the following link: https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=322604643123-ru3spb69lmg3nmo1gr1uqf1etb32tbs2.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&state=tvtLIvwU8axrPSDxWXbIpg Log in and authorize rclone for access Enter verification code> # 授权码每个人都不一样,following link 也不一样。
是否是谷歌团队盘
因为使用的是团队盘,当然选y
1 2 3 4 5 6
Log in and authorize rclone for access Enter verification code> 4/0AGPbXQ9thkw4XynGuNP91QxL4g9Mz7Rubv7M_lajOCwd8GqHuTlOzI Configure this as a team drive? y) Yes n) No (default) y/n> y
选择要挂载的团队盘
团队盘就是谷歌共享盘下的一个文件夹,一个文件夹算一个团队盘。
因为我有两个团队盘,并且命名了ZIO-X,,
所以,这里能看到两个选项,一个remote只能绑定一个团队盘。
以后多创几个remote里挂载这些团队盘就好。
1 2 3 4 5 6 7
Fetching team drive list... Choose a number from below, or type in your own value 1 / ZIO-1 \ "xxxx" 2 / ZIO-2 \ "xxxx" Enter a Team Drive ID> # 每个人都不一样,根据自己需求选择要绑定哪一个团队盘
信息核实
最后核实一下remote的各项参数,确认就敲个y就行
1 2 3 4 5 6 7 8 9 10 11 12 13
-------------------- [ZIO-2] type = drive client_id = XXX client_secret = XXX scope = drive token = XXX team_drive = XXX -------------------- y) Yes this is OK (default) e) Edit this remote d) Delete this remote y/e/d> y
romete列表
会显示当前机器上保存的romete的列表,看看就好,敲q退出
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Current remotes:
Name Type ==== ==== ZIO-2 drive
e) Edit existing remote n) New remote d) Delete remote r) Rename remote c) Copy remote s) Set configuration password q) Quit config e/n/d/r/c/s/q> q