美文网首页
Linux命令行上传文件到百度网盘

Linux命令行上传文件到百度网盘

作者: 活活的鱼 | 来源:发表于2020-07-21 17:08 被阅读0次

百度云/百度网盘Python客户端github项目
系统环境:
linux与ma + python3.6
安装依赖包

pip install requests
pip install bypy==1.6.10

授权登陆:

执行 bypy info,显示下边信息,根据提示,通过浏览器访问下边灰色的https链接,如果此时百度网盘账号正在登陆,会出现长串授权码,复制。

bypy info

显示如下信息

Please visit: # 访问下边这个连接,复制授权码
https://openapi.baidu.com/oauth/2.0/authorize?scope=basic+netdisk&redirect_uri=oob&response_type=code&client_id=q8WE4EpCsau1oS0MplgMKNBn
And authorize this app
Paste the Authorization Code here within 10 minutes.
Press [Enter] when you are done # 提示在下边粘贴授权码

在下边图示红色位置粘贴授权码,耐心等待一会即可(1-2分钟)

Authorizing, please be patient, it may take upto 300 seconds...
Authorizing with the Heroku server ...
Heroku server failed, authorizing with the Heroku1 server ...
Successfully authorized
Quota: 6.112TB
Used: 1.569TB

授权成功。
显示在云盘(程序的)根目录下文件列表:

bypy list

把当前目录同步到云盘:

bypy syncup

or

bypy upload

把云盘内容同步到本地来:

bypy syncdown

or

bypy downdir /

比较本地当前目录和云盘(程序的)根目录(个人认为非常有用):

bypy compare

更多增删改查等操作可以执行以下命令

bypy help

Commands:
refreshtoken - refresh the access token
cdl_add <source_url> [save_path] [timeout] - add an offline (cloud) download task
cdl_addmon <source_url> [save_path] [timeout] - add an offline (cloud) download task and monitor the download progress
cdl_cancel <task_id> - cancel an offline (cloud) download task
cdl_list - list offline (cloud) download tasks
cdl_query <task_ids> - query existing offline (cloud) download tasks
cleancache - remove invalid entries from hash cache file
combine <remotefile> [localfile] [md5s] - try to create a file at PCS by combining slices, having MD5s specified
compare [remotedir] [localdir] - compare the remote directory with the local directory
copy/cp <from> <to> - copy a file / dir remotely at Baidu Yun
delete/remove/rm <remotepath> - delete a file / dir remotely at Baidu Yun
downdir [remotedir] [localdir] - download a remote directory (recursively)
downfile <remotefile> [localpath] - download a remote file.
download [remotepath] [localpath] - download a remote directory (recursively) / file
dumpcache - display file hash cache
list/ls [remotepath] [format] [sort] [order] - list the 'remotepath' directory at Baidu PCS
listrecycle [start] [limit] - list the recycle contents
meta <remotepath> [format] - get information of the given path (dir / file) at Baidu Yun.
mkdir <remotedir> - create a directory at Baidu Yun
move/mv/rename/ren <from> <to> - move a file / dir remotely at Baidu Yun
quota/info - displays the quota information
restore <remotepath> - restore a file from the recycle bin
search <keyword> [remotepath] [recursive] - search for a file using keyword at Baidu Yun
stream <remotefile> <localpipe> [format] [chunk] - stream a video / audio file converted to M3U format at cloud side, to a pipe.
syncdown [remotedir] [localdir] [deletelocal] - sync down from the remote directory to the local directory
syncup [localdir] [remotedir] [deleteremote] - sync up from the local directory to the remote directory
upload [localpath] [remotepath] [ondup] - upload a file or directory (recursively)

相关文章

  • Linux命令行上传文件到百度网盘

    安装软件工具: 授权登陆:执行 bypy info,显示下边信息,根据提示,通过浏览器访问下边灰色的https链接...

  • Linux命令行上传文件到百度网盘

    百度云/百度网盘Python客户端github项目系统环境:linux与ma + python3.6安装依赖包 ...

  • 本地与linux服务器之间文件传输(含scp命令)

    1. 本地文件上传附件到linux服务器 在Xshell命令行中输入rz命令后,会弹出对话框,选择你要上传的文件,...

  • Servlet 实现文件上传

    Servlet 实现文件上传 所谓文件上传就是将本地的文件发送到服务器中保存。例如我们向百度网盘中上传本地的资源或...

  • html使用element ui

    html使用element ui 所需文件已上传百度网盘,引入顺序必须是此顺序

  • XShell上传文件到Linux服务器上

    转载:XShell上传文件到Linux服务器上 在学习Linux过程中,我们常常需要将本地文件上传到Linux主机...

  • mac 上传文件或文件夹到linux服务

    1、mac上传文件到linux服务器 2、mac上传文件夹到linux服务器,与上传文件相比多加了-r 3、lin...

  • mac 上传文件到linux服务

    1、mac上传文件到linux服务器 2、mac上传文件夹到linux服务器,与上传文件相比多加了-r 3、lin...

  • Mac 命令行

    命令行 Linux命令 Curl curl是一个传输文件(上传、下载)的命令行工具,它支持FTP,FTPS,HTT...

  • 永远有效

    刚刚让小韦上传《净土宗精要法语解》的PDF文档到百度网盘。上传好了,他从微信上转链接给我看,打开链接,上面是文件,...

网友评论

      本文标题:Linux命令行上传文件到百度网盘

      本文链接:https://www.haomeiwen.com/subject/iffwkktx.html