{"id":1712,"date":"2021-11-28T03:37:40","date_gmt":"2021-11-27T19:37:40","guid":{"rendered":"https:\/\/gnonstop.linkpc.net\/wp\/?p=1712"},"modified":"2025-08-31T05:53:02","modified_gmt":"2025-08-30T21:53:02","slug":"how-to-upload-a-file-to-google-drive-from-the-command-line","status":"publish","type":"post","link":"https:\/\/guerilla.ddns.net\/wp\/?p=1712","title":{"rendered":"Linux \u5982\u4f55\u5728\u547d\u4ee4\u5217\u6a21\u5f0f\u4e0a\u50b3\u6a94\u6848\u5230 Google \u96f2\u7aef\u786c\u789f"},"content":{"rendered":"<p>1. \u5230 <a href=\"https:\/\/github.com\/prasmussen\/gdrive\/releases\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/prasmussen\/gdrive\/releases<\/a> \u4e0b\u8f09 linux \u7248\u672c\u7684 gdrive<\/p>\n<p>\u4f8b\u5982\u7528 wget \u4e0b\u8f09 linux 64 \u4f4d\u5143\u7248\u672c\u7684 gdrive:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">wget https:\/\/github.com\/prasmussen\/gdrive\/releases\/download\/2.1.1\/gdrive_2.1.1_linux_amd64.tar.gz<\/code><\/pre>\n<p>&nbsp;<br \/>\n\u89e3\u58d3\u7e2e:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">tar zxvf gdrive_2.1.1_linux_amd64.tar.gz<\/code><\/pre>\n<p>&nbsp;<br \/>\n2. <\/p>\n<pre><code class=\"language-bash\" data-line=\"\">sudo install gdrive \/usr\/local\/bin\/gdrive<\/code><\/pre>\n<p>&nbsp;<br \/>\n3. <\/p>\n<pre><code class=\"language-bash\" data-line=\"\">gdrive list<\/code><\/pre>\n<p>\u8907\u88fd\u7a0b\u5f0f\u7522\u751f\u7684\u9023\u7d50\u6587\u5b57\uff0c\u7136\u5f8c\u8cbc\u5230\u700f\u89bd\u5668\u4e0a<br \/>\n&nbsp;<br \/>\nps: \u5982\u679c\u6b64\u6642\u5f97\u5230\u932f\u8aa4\u8a0a\u606f &#8220;No such file or directory&#8221;\uff0c\u4e26\u4e14\u7cfb\u7d71\u662f 64 \u4f4d\u5143 linux\uff0c\u8a66\u8457\u5b89\u88dd msul, \u4ee5 Ubuntu \u70ba\u4f8b:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">sudo apt install musl<\/code><\/pre>\n<p>&nbsp;<br \/>\n4. \u6536\u5de5\uff0c\u9019\u6642\u53ef\u4ee5\u57f7\u884c\u9019\u500b\u6307\u4ee4\u4f86\u4e0a\u50b3\u6a94\u6848\u5230 Google \u96f2\u7aef\u786c\u789f<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">gdrive upload backups.tar.gz<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<br \/>\nsource: <a href=\"https:\/\/medium.com\/geekculture\/how-to-upload-file-to-google-drive-from-linux-command-line-69668fbe4937\" target=\"_blank\" rel=\"noopener\"><i>How to Upload File to Google Drive from Linux Command Line<\/i><\/a><br \/>\n&nbsp;<\/p>\n<p>#linux #ubuntu #upload #google_drive<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. \u5230 https:\/\/github.com\/prasmussen\/gdrive\/releases \u4e0b\u8f09 l [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[179],"tags":[63,18],"class_list":["post-1712","post","type-post","status-publish","format-standard","hentry","category-infotech","tag-linux","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1712","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1712"}],"version-history":[{"count":23,"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1712\/revisions"}],"predecessor-version":[{"id":3518,"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1712\/revisions\/3518"}],"wp:attachment":[{"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1712"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1712"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/guerilla.ddns.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1712"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}