wget https://dl.jiasu7.top/tools/rc.sh
bash rc.sh
rclone config
首先安装依赖
yum -y install epel-release
yum -y install wget unzip screen fuse fuse-devel
安装rclone
curl https://rclone.org/install.sh | sudo bash
挂载google drive步骤
rclone config
n) New remote
name> 填写配置名称
13 / Google Drive (根据版本不同序号可能变化)
client_id> 回车
client_secret>回车
scope>1 (1是: 1 / Full access all files, excluding Application Data Folder. "drive")
root_folder_id> 回车
service_account_file> 回车
Edit advanced config? (y/n) 回车
Use auto config?
n) No
y/n> n
Please go to the following link: https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=*
复制链接到浏览器进行登录,获得code
nter verification code>
Configure this as a team drive?(有无限盘的选y)
y) Yes
n) No (default)
之后回车,到初始菜单后选q退出
挂载:
首先创建要挂载到的文件夹,也可以直接挂载到/
mkdir /root/gdrive
rclone mount 配置名称: 挂载路径 --allow-other --allow-non-empty --vfs-cache-mode writes
*注意:文件夹名可留空,:号后是空格,然后是path,如果填写了文件夹名,那么网盘里会自动创建文件夹,所有/root/gdrive路径下的文件都会上传到网盘的这个文件夹里。
最后使用df -h命令查看是否成功
取消挂载:
fusermount -qzu /root/gdrive
rclone config - 以控制会话的形式添加rclone的配置,配置保存在.rclone.conf文件中。
rclone copy - 将文件从源复制到目的地址,跳过已复制完成的。
rclone sync - 将源数据同步到目的地址,只更新目的地址的数据。 –dry-run标志来检查要复制、删除的数据
rclone move - 将源数据移动到目的地址。
rclone delete - 删除指定路径下的文件内容。
rclone purge - 清空指定路径下所有文件数据。
rclone mkdir - 创建一个新目录。
rclone rmdir - 删除空目录。
rclone check - 检查源和目的地址数据是否匹配。
rclone ls - 列出指定路径下所有的文件以及文件大小和路径。
rclone lsd - 列出指定路径下所有的目录/容器/桶。
rclone lsl - 列出指定路径下所有文件以及修改时间、文件大小和路径。
rclone md5sum - 为指定路径下的所有文件产生一个md5sum文件。
rclone sha1sum - 为指定路径下的所有文件产生一个sha1sum文件。
rclone size - 获取指定路径下,文件内容的总大小。.
rclone version - 查看当前版本。
rclone cleanup - 清空remote。
rclone dedupe - 交互式查找重复文件,进行删除/重命名操作。
————————————————
#如无特别声明,该文章均为 yun 原创,转载请遵循
署名-非商业性使用 4.0 国际(CC BY-NC 4.0) 协议,即转载请注明文章来源。
#最后编辑时间为: 2022 年 03 月 25 日
主题名称:DreamCat | 版本:X1.9-20210218
主题开发:HanFengA7 | TeddyNight | Dev-Leo | CornWorld | WBStudio | 学神之女
Designed by HanFengA7 Power by Typecho
Copyright © 2015-2021 by LychApe All rights reserved!