LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-20-2016, 05:22 PM   #1
steve51184
Member
 
Registered: Dec 2006
Posts: 381

Rep: Reputation: 30
trying to uploaded files from a linux server to google drive with there official cli software but i need a little help


the command i use to upload a folder is:

Code:
/location/to/gdrive upload --recursive /folder/to/upload/
which will upload everything in the 'upload' folder to my google drive account which is just what i wanted

only problem is i can't chose where the 'upload' folder gets uploaded to so it just make a folder called 'upload' in my main google drive account

problem is i run this command multiple times (for backups via cron) and everytimr is does this is makes a ne 'upload' folder is my google drive account so my google drive account is just full of 'upload' folders

a second problem is the 'delete file after successful upload' is for folder upload only file so i made something like this:

Code:
for f in /folder.to/upload/*.*; do /location/to/gdrive upload --name --delete $f; done
which seems to upload the files but there all called '--delete'

any help or a suggestion for a better google drive cli program that does what i need would be appreciated thanks

link to project: https://github.com/prasmussen/gdrive
 
Old 08-20-2016, 06:29 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 24,205

Rep: Reputation: 7128Reputation: 7128Reputation: 7128Reputation: 7128Reputation: 7128Reputation: 7128Reputation: 7128Reputation: 7128Reputation: 7128Reputation: 7128Reputation: 7128
Quote:
Originally Posted by steve51184 View Post
the command i use to upload a folder is:
Code:
/location/to/gdrive upload --recursive /folder/to/upload/
which will upload everything in the 'upload' folder to my google drive account which is just what i wanted

only problem is i can't chose where the 'upload' folder gets uploaded to so it just make a folder called 'upload' in my main google drive account

problem is i run this command multiple times (for backups via cron) and everytimr is does this is makes a ne 'upload' folder is my google drive account so my google drive account is just full of 'upload' folders

a second problem is the 'delete file after successful upload' is for folder upload only file so i made something like this:
Code:
for f in /folder.to/upload/*.*; do /location/to/gdrive upload --name --delete $f; done
which seems to upload the files but there all called '--delete'

any help or a suggestion for a better google drive cli program that does what i need would be appreciated thanks
link to project: https://github.com/prasmussen/gdrive
I slayed the same dragon not too long ago. Check out what I posted here:
http://www.linuxquestions.org/questi...ve-4175580033/
 
Old 08-21-2016, 02:03 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 17,995
Blog Entries: 12

Rep: Reputation: 5456Reputation: 5456Reputation: 5456Reputation: 5456Reputation: 5456Reputation: 5456Reputation: 5456Reputation: 5456Reputation: 5456Reputation: 5456Reputation: 5456
Quote:
Originally Posted by steve51184 View Post
there's a lot of documentation there.
did you read it all?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Google Adds Your Google Drive Files To SERPs LXer Syndicated Linux News 0 10-16-2012 01:40 PM
Files uploaded by OSX machines to vsftp server can't be deleted by other users anon091 Linux - Newbie 25 02-23-2011 08:09 AM
Uploaded files from PHP app are dissapearing on new ubuntu server rgman Linux - Server 4 04-01-2009 02:47 AM
guys why do u think google hasn't made an official google talk linux on linux platfor deepinlife General 11 11-12-2006 10:20 AM
How to keep the original time of files uploaded to FTP server wondial Linux - Software 1 10-26-2004 10:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration