Grive2

Get dependencies

You need to get the dependency libraries along with their development (-dev or -devel) packages:

  • yajl 2.x
  • libcurl
  • STL (libstdc++)
  • libgcrypt
  • Boost (filesystem, program_options, regex, unit_test_framework and system)
  • expat

There are also some optional dependencies:

  • CppUnit (for unit tests)
  • libbfd (for backtrace)
  • binutils (for libiberty, required for compilation in OpenSUSE, Ubuntu, Arch and etc)

And tools:

  • Git
  • CMake
  • C++ compiler (g++ or clang)

On a Debian/Ubuntu/Linux Mint machine just install the following packages:

sudo apt-get install git cmake build-essential libgcrypt11-dev libyajl-dev libboost-all-dev libcurl4-openssl-dev libexpat1-dev libcppunit-dev binutils-dev

Download sources

CMake

Now that you are in the source code's “grive2” subdirectory (after 'cd /path/to/yourGriveSourceCodeDir/grive2'), at the prompt type:

mkdir build
cd build
cmake ..
  • note the double period (..) as the argument to cmake, to denote the parent directory.
  • You should get a success message like: ”– Build files have been written to: /your/dir”
  • Don't run it with sudo - root access is not needed for building.

Make and install

At the prompt type:

make -j4

You'll get lots of messages & hopefully a success message: ”[100%] Built target grive_executable”. The executable file itself (called “grive”) will be placed in the “grive” subdirectory.

Then install it to the system binary directory (/usr/local/bin by default) by running:

sudo make install

Updates

For subsequent updates, you'll run `git pull` to get the latest source and then just rebuild and re-install it:

cd /path/to/yourGriveSourceCodeDir/grive2
git pull
cd build
cmake ..
make -j4
sudo make install

Usage

Backup

Since grive is still «beta» or «alpha» you should better keep a backup copy of your google directory.

First run

Change to your google drive sync directory, and run grive -a:

cd /home/you/yourGoogleDrive/
grive -a

The «-a» option is only needed the very first time you run grive.

Visit the URL that comes up, then post the auth code given (you must have been logged into Google). You should get some messages including «Synchronizing files» … now you are running.

Syncs

To sync, you must run the program manually (there is no «real-time watching» yet). At the prompt, type:

cd /home/you/yourGoogleDrive/
grive

You can set up a cron job, if you want this done on a regular basis.

Command line options

Short option Long option Description
-h --help Produce help message
-v --version Display Grive version
-a --auth Request authorization token
-p arg --path arg Root directory to sync
-s arg --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 arg --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.
  --ignore arg Perl RegExp to ignore files (matched against relative paths, remembered for next runs).

A replacement solution to using Google Drive in Ubuntu的更多相关文章

  1. 网盘的选择,百度网盘、google drive 还是 Dropbox

    我是国内用户,需要越过Chinawall 我使用的是一枝红杏,用着还行 如果要买,结账时输入'laod80' 一枝红杏官网:官网地址 Dropbox: 稳定,速度快 Dropbox官网:链接 操作十分 ...

  2. 【转】Expire Google Drive Files 让Google Docs云盘共享连接在指定时间后自动失效

    最近在清理Google Docs中之前共享过的文件链接,发现Google Docs多人协作共享过的链接会一直存在,在实际操作中较不灵活.正好订阅的RSS推送了Pseric写的这篇文章 - Expire ...

  3. WordPress UpdraftPlus插件 Google Drive 备份

    本文连接地址: http://blog.tuzhuke.info/?p=168 本文作者:tuzhuke 完成时间:2015-04-10 使用wordpress 搭建自己的博客网站,但是对于租用的服务 ...

  4. Google Drive 里的文件下载的方法

    Google Drive 里并不提供创建直接下载链接的选项,但是可以通过小小的更改链接形式就能把分享的内容保存到本地.例如,一份通过 Google Drive 分享的文件链接形式为: https:// ...

  5. Appengine直接下载文件并保存到google drive

    一直对下载文件比较感兴趣.前些日子无意搜到google 推出一项服务,可以直接将文件下载到google drive中,原型猛戳这里,但有限额限制.一时脑洞大开,可不可以在appengine 上架设服务 ...

  6. Syncovery : Google Docs protocol completely replaced with Google Drive

    Google Docs protocol completely replaced with Google Drive In May 2015, the older Google Docs API wa ...

  7. Linux 网站文件和数据库全量备份 一键脚本(支持FTP,Google Drive)

    原文连接: https://teddysun.com/469.html 此文为转载,建议查看秋水大神的原文,排版更容易查看,另外,建议查看脚本源码,方便了解脚本运行过程, 脚本已测试,大神的脚本一如既 ...

  8. 教你用 google-drive-ocamlfuse 在 Linux 上挂载 Google Drive

    如果你在找一个方便的方式在 Linux 机器上挂载你的 Google Drive 文件夹, Jack Wallen 将教你怎么使用 google-drive-ocamlfuse 来挂载 Google ...

  9. 在Google Drive上建立免费静态站点

    现今建立一个属于自己的站点已经是一件非常普遍和简单的事情了. 你能够选择买空间,买域名.你也能够使用免费空间.免费域名.你能够选择动态的php wordpress,joomla或者是静态的站点(如使用 ...

随机推荐

  1. IE、FF、Chrome浏览器中的JS差异介绍

     FF.Chrome:没有window.event对象 FF.Chrome:没有window.event对象,只有event对象,IE里只支持window.event,而其他主流浏览器两者都支持,所以 ...

  2. Android padding和margin的区别

    如: Padding 为内边框,指该控件内部内容,如文本/图片距离该控件的边距 Margin 为外边框,指该控件距离边父控件的边距 如: 当按钮分别设置以上两个属性时,得到的效果是不一样的. andr ...

  3. 从java main方法说开去(转)

    刚刚接触java语言时,接触的便为一个java main方法.我们知道这样程序就可以运行了,但是程序是怎么运行起来的我们却不知道. 众所周知,当执行一个java程序时,首先会启动一个JVM虚拟机进程, ...

  4. 安装和配置jBPM4,并举个hello.w

    至于网上很复杂,但又不懂的插件,我们先不鸟他. myeclipse8\dropins这里就是给我们放插件的,类似SVN之类的.所以小生也修改了下,共享了下.只有放在目录下,打开应该可以的.下面是链接. ...

  5. [sso]搭建CAS单点服务器

    1.下载服务器端文件 Cas Client下载:http://developer.jasig.org/cas-clients/ CAS Server:cas-server-4.0.0-release. ...

  6. windows访问ubuntu的文件

    前提:windows电脑和ubuntu电脑要工作在同一个网段! 1.先要安装Samba sudo apt-get install samba openssh-server 2.编译Samba配置文件 ...

  7. .NET异常处理的动作策略(Action Policy)

    SQL Server 2008基于策略的管理,基于策略的管理(Policy Based Management),使DBA们可以制定管理策略,并将这些策略应用到服务器.数据库以及数据环境中的其他对象上去 ...

  8. PID控制算法

    PID控制算法 四轴如何起飞的原理 四轴飞行器的螺旋桨与空气发生相对运动,产生了向上的升力,当升力大于四轴的重力时四轴就可以起飞了. 四轴飞行器飞行过程中如何保持水平: 我们先假设一种理想状况:四个电 ...

  9. Linux的常用目录学习笔记

    首先,先查看一下Linuxi的一级目录结构: ls: /:表示根目录,文件系统的入口,最高一级目录. bin和sbin:命令保存目录,bin是普通用户能,sbin是root用户用的:/bin存放着系统 ...

  10. 服务器报nginx: [warn] conflicting server name "blog.xueyi.com" on 0.0.0.0:80, ignored

    nginx: [warn] conflicting server name "blog.xueyi.com" on 0.0.0.0:80, ignored 修改nginx配置参数后 ...