gdrive 命令详解

| 选择喜欢的代码风格  

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

gdrive 命令安装:


-bash/zsh: gdrive command not not found

# OS X
brew install gdrive

# Dockerfile
dockerfile.run/gdrive

gdrive 命令补充说明:


gdrive 是一个用于与 Google Drive 交互的命令行应用程序。它是 gdrive2 的后续版本,但目前仅实现了最基本的功能:用于与 Google Drive 交互的命令行界面。它允许用户直接从 Linux 终端执行各种操作,例如上传、下载、列出文件、创建文件夹、共享文件和管理权限。

这对于自动备份、编写文件管理任务脚本以及将 Google Drive 与其他命令行工具集成尤其有用。它与 Google Drive API 交互,因此最初需要进行适当的身份验证和授权设置。这包括从 Google Cloud Console 获取凭据并通过 OAuth 2.0 流程授权应用程序。

请注意,存在许多第三方实现和包装器,因此使用可信且经过验证的版本(例如,来自信誉良好的 GitHub 代码库)至关重要。

gdrive 命令语法:


gdrive command [options] [arguments]

gdrive 命令选项:


list
    Lists files and folders in Google Drive.

upload file
    Uploads a local file to Google Drive.

download file ID
    Downloads a file from Google Drive using its ID.

delete file ID
    Deletes a file from Google Drive using its ID.

mkdir folder name
    Creates a new folder in Google Drive.

share file ID
    Shares a file or folder with specified permissions.

info file ID
    Displays detailed information about a specific file in Drive.

about
    Displays information about your Google Drive account (storage used, etc.).

auth
    Initializes the authentication process with Google Drive.

-h, --help
    Shows help message and exit.

-v, --version
    Shows the version of the gdrive command.

gdrive 命令实例:


gdrive 将本地路径上传到指定ID的父文件夹:

gdrive upload -p id path/to/file_or_folder

gdrive 根据 ID 下载文件或目录到当前目录:

gdrive download id

gdrive 更改默认显示以显示更多详细信息:

gdrive -v

gdrive 根据 ID 下载到指定的本地路径:

gdrive download --path path/to/folder id

gdrive 使用给定的文件或文件夹创建 ID 的新修订版:

gdrive update id path/to/file_or_folder

gdrive 命令扩展阅读:


 

CommandNotFound ⚡️ 坑否 - 其他频道扩展阅读:




gdrive 命令评论