Ubuntu 16.04安裝Google Drive Linux用戶端Grive2 0.5.1

來源:互聯網
上載者:User

Ubuntu 16.04安裝Google Drive Linux用戶端Grive2 0.5.1

作為一個非官方的Google Drive 用戶端Grive2是一個簡單的Linux用戶端應用程式,只需下載您的Google Drive中的所有檔案到目前的目錄。你以後本地修改檔案,再次運行Grive,它就會上傳更改回你的Google Drive。

幾個特點

  • New files created locally or in Google Drive will be uploaded or downloaded respectively
  • Deleted files will also be “removed”
  • Currently Grive will NOT destroy any of your files: it will only move the files to a directory named .trash or put them in the Google Drive trash
  • You can always recover them.

There are a few things that Grive does not do at the moment:

  • continously wait for changes in file system or in Google Drive to occur and upload. A sync is only performed when you run Grive.
  • symbolic links support.
  • support for Google documents.

Grive2 0.5.1 亮點:

  • no-remote-new and upload-only modes
  • ignore regexp does not persist anymore (note that Grive will still track it to not accidentally delete remote files when changing ignore regexp)
  • added options to limit upload and download speed

Ubuntu 16.04 (Xenial Xerus), Ubuntu 15.10 (Wily Werewolf), Ubuntu 15.04(Vivid Vervet), Ubuntu 14.04 (Trusty Tahr) 安裝 Grive2 0.5.1

sudo add-apt-repository ppa:nilarimogard/webupd8

sudo apt-get update

sudo apt-get install grive

要查看Grive命令的可用選項的所有列表,執行:

sudo grive --help

輸出樣本:

bkjia@bkjia:~$ sudo grive --help

Grive options:
  -h [ --help ]        Produce help message
  -v [ --version ]      Display Grive version
  -a [ --auth ]        Request authorization token
  -p [ --path ] arg    Path to sync
  -s [ --dir ] arg      Subdirectory to sync
  -V [ --verbose ]      Verbose mode. Enable more messages than normal.
  --log-xml            Log more HTTP responses as XML for debugging.
  --new-rev            Create new revisions in server for updated files.
  -d [ --debug ]        Enable debug level messages. Implies -v.
  -l [ --log ] arg      Set log output filename.
  -f [ --force ]        Force grive to always download a file from Google Drive
                        instead of uploading it.
  --dry-run            Only detect which files need to be uploaded/downloaded,
                        without actually performing them.

在您的本地系統中建立一個下載/上傳檔案夾(再同步)。

bkjia@bkjia:~$ mkdir /home/bkjia/sync

進入新建立的“同步”的目錄。

bkjia@bkjia:~$ cd sync/

首次運行下面的命令。

bkjia@bkjia:~/sync$ grive -a

上面的命令將顯示一個URL。

-----------------------
Please go to this URL and get an authentication code:

https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile+https%3A%2F%2Fdocs.google.com%2Ffeeds%2F+https%3A%2F%2Fdocs.googleusercontent.com%2F+https%3A%2F%2Fspreadsheets.google.com%2Ffeeds%2F&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&client_id=22314510474.apps.googleusercontent.com

-----------------------
Please input the authentication code here:

複製並粘貼該URL到瀏覽器中。接下來,您將被要求提供訪問您的Google Drive。輸入您的Gmail憑證。最後,認證碼將被顯示。複製驗證代碼並將其粘貼在您運行“grive-a”命令終端。就可以。



現在,只要你想檔案/檔案夾同步,並從您Google Drive進入“同步”檔案夾,然後運行以下命令:

bkjia@bkjia:~$ cd /home/bkjia/sync/

bkjia@bkjia:~/sync$ sync

請注意,您不必有“-a”參數每次。因為我們已經與Google Drive進行身分識別驗證。

安裝 Grive-tools, 一個圖形介面的 Front-end for Grive。

從命令列工作是新手有點難度。因此,fansclub團隊開發了一個GUI前端稱為grive-tools for Grive.。

首先,添加grive-tools PPA為Ubuntu 15.04和舊版本和其他Ubuntu的衍生產品。

sudo add-apt-repository ppa:thefanclub/grive-tools
sudo apt-get update
sudo apt-get install grive-tools

配置Grive

安裝Grive和Grive-tools後,您應該配置Google accounts for Grive。您從終端開啟它:sudo grive-setup

點擊下一步登入到您的Google帳戶。

You should configure Google accounts for Grive. Search for “Grive Setup” either from the Menu or Dash. Also you can open it from the Terminal by typing “sudo grive-setup”:

一個新的瀏覽器視窗會現已開放,請您登入到您的Google帳戶。輸入您的Gmail憑證,並允許Grive訪問您的Google Drive。認證碼將被顯示。複製/粘貼到Grive視窗代碼,然後單擊下一步繼續。

現在,安裝程式將在您的首頁檔案夾中建立一個名為Google Drive硬碟檔案夾(例如/home/bkjia/Google Drive),和同步從Google的所有檔案磁碟機複製到本地檔案夾。

同步完成後,你應該看到,上面寫著一個確認資訊:安裝完成。

點擊完成以完成安裝。

現在你可以看到從Google Drive中的所有檔案將在您的本地系統Google Drive檔案夾中找到。

你可以在你的主目錄當地Google Drive檔案夾。請參考下面的。

從現在起,複製和粘貼的檔案/檔案要同步到您的線上Google Drive帳戶檔案夾在本地Google Drive檔案夾。

OK。開始使用在Ubuntu案頭使用Google Drive。

乾杯!

Ubuntu 16.04 LTS正式發布下載,長達5年支援人員 

Ubuntu 16.04 隨身碟安裝圖文教程

Ubuntu 16.04 LTS安裝好需要設定的15件事

Ubuntu 16.04 LTS 今日發布 Canonical公布系統新特性

將Ubuntu 15.10升級到Ubuntu 16.04 

Ubuntu 16.04安裝Lua遊戲引擎Love

Ubuntu 16.04 LTS如何使用Snap軟體包

Ubuntu 16.04 需要你的協助,讓 GNOME Software 更美觀

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.