grive 的使用參數

grive 程式路徑
$ which grive
/usr/local/bin/grive

grive 使用參數
$ /usr/local/bin/grive –help
Grive options:
  -h [ –help ]               Produce help message
  -v [ –version ]            Display Grive version
  -a [ –auth ]               Request authorization token
  -p [ –path ] arg           Root directory to sync
  -s [ –dir ] arg            Single subdirectory to sync (remembered for next
                              runs)
  -V [ –verbose ]            Verbose mode. Enable more messages than normal.
  –log-http arg              Log all HTTP responses in this file 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.
  -u [ –upload-only ]        Do not download anything from Google Drive, only
                              upload local changes
  -n [ –no-remote-new ]      Download only files that are changed in Google
                              Drive and already exist locally
  –dry-run                   Only detect which files need to be
                              uploaded/downloaded, without actually performing
                              them.
  –ignore arg                Perl RegExp to ignore files (matched against
                              relative paths, remembered for next runs).
  -U [ –upload-speed ] arg   Limit upload speed in kbytes per second
  -D [ –download-speed ] arg Limit download speed in kbytes per second[@more@]-h 列出參數說明

-v 列出 grive 版本
$ /usr/local/bin/grive -v
grive version 0.5.1-dev Jun 30 2016 13:33:47

-a 取得授權碼
$ /usr/local/bin/grive -a

-p 要同步的根目錄,同步到 Google Drive 後,呈現的就是 /home/t850008/Google 目錄下的檔案及目錄
$ /usr/local/bin/grive -p /home/t850008/Google

-s 單一子目錄同步
$ /usr/local/bin/grive -s /home/t850008/Google/123

-V 詳細模式,啟用比正常更多的訊息
$ /usr/local/bin/grive -p /home/t850008/Google -V
config file name “/home/t850008/Google/.grive”
Reading local directories
file .grive_state is ignored by grive
file .grive is ignored by grive
Reading remote server file list
file “/home/t850008/Google/格式工廠 format factory 3.8.0.0 中文免安裝版.exe” is already in sync
Synchronizing files
sync “/home/t850008/Google” already in sync
sync “/home/t850008/Google/pCloud_Windows_3.2.4.exe” deleted in remote. deleting local
sync “/home/t850008/Google/格式工廠 format factory 3.8.0.0 中文免安裝版.exe” already in sync
change stamp is set to 14
Finished!

-l 設定輸入的 log 檔的檔案名稱

-f 強制
$ /usr/local/bin/grive -p /home/t850008/Google -f

-u 不從 Google Drive 下載檔案, 只上傳本地端有改變的檔案
$ /usr/local/bin/grive -p /home/t850008/Google -u

-n 只下載 Google Drive 有改變且已存在本地端的檔案,也會上傳本地端的檔案到 Google Drive
$ /usr/local/bin/grive -p /home/t850008/Google -n

–dry-run 只偵測哪些檔案要處理,並不實際做檔案的上傳或下載
$ /usr/local/bin/grive -p /home/t850008/Google –dry-run

–ignore 使用 Perl 常規表示式來過濾一些不處理的目錄(針對相對應目錄處理)

-U 限制上傳的速度  kbytes per second
-D 限制下載的速度  kbytes per second