Ubuntu – How to upload a file to google drive

google-drivegriversyncsync

I would like to just upload files to google drive from the command line. I don't care about synchronisation. I just want to upload things to google drive and if they exist they get replaced if not they are created.

I know grive exists but that syncs everything from google drive to the folder you use which isn't what I want.

I was wondering if there is a solution to this, through scp or something similar?

thanks

Best Answer

send the file to your gmail account as attachment and from there you can save it to google drive directly.

uuencode file.txt file.txt | mail your_email@gmail.com

I know this is not direct to gdrive, but as there is no other options available I use this easy approach.