Command Line Upload Google Drive Raspberry Pi

How to upload a file to Google Drive from the command line

I've been looking at several linux projects here recently, such as LibreNMS, and you'll need to be sure you lot are bankroll them upwardly. I wanted to rapidly fill-in a compressed re-create of my LibreNMS install and so I went looking for a super piece of cake style to upload a file to Google Drive, and I found it with gdrive.

gdrive, not to be mistaken for Google Drive itself, is a command line tool by Petter Rasmussen for Linux, Windows and OSX. Just what I needed. Information technology's proved itself and then useful that I tin't imagine how I lived without it.

Linux

  1. SSH on to your linux box and download the Linux version of gdrive from GitHub.
  2. You should run across a file in your home directory called something listuc=0B3X9GlR6EmbnWksyTEtCM0VfaFE. Rename this file to gdrive.
  3. Assign this file executable rights.
  4. Install the file to your usr binder.
  5. Yous'll demand to tell Google Bulldoze to allow this program to connect to your business relationship. To practise this, run the gdrive plan with any parameter and copy the text information technology gives you to your browser. Then paste in to your SSH window the response code that Google gives yous.Run the following.
    2016-03-18-16_44_23-olly@ollys-backup-server_-_backups_sql
  6. Y'all ARE Done! Now yous can upload files as required.

Windows

  1. Download the Windows version of gdrive from github.
  2. Re-create the gdrive-windows-x64.exe file to your c:\windows binder
  3. Run gdrive with a parameter to get the Google authentication code and then copy that to a browser windows. Paste back the verification code.
    2016-03-18-16_58_22-C__Windows_system32_cmd.exe---gdrive-windows-x64--list
  4. Now upload a file. WOOOT!

Common Switches

GDrive supports a load of useful features which you lot should take a await at. The follow are grabbed from the gDrive page at git.com.

Upload file or directory

Download file or directory

List files

Share file or directory

coxquichishipt.blogspot.com

Source: https://wp.huangshiyang.com/how-to-upload-a-file-to-google-drive-from-the-command-line

0 Response to "Command Line Upload Google Drive Raspberry Pi"

Enregistrer un commentaire

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel