rclone挂载google drive

首先安装依赖 

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?
 * 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

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 配置名称:文件夹名 /root/gdrive --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 - 交互式查找重复文件,进行删除/重命名操作。
#### 其他 ####


 

 

发布了10 篇原创文章 · 获赞 0 · 访问量 1253
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章