linux - 百度网盘命令行工具

xiaoxiao2021-02-28  108

C/C++写的一个百度网盘工具,可以在linux终端中使用。这是通过分析网盘网站得到的直接接口,不需要创建应用。 支持多线程下载和下载时断点续传。 支持快速上传和多线程分片上传。 支持线程限速。具体查看'pcs set'和'pcs context'命令的说明。

支持AES-CBC-128, AES-CBC-192, AES-CBC-256加密。

貌似要翻墙

url:  http://baidunetworkdisk.codeplex.com/

一:安装依赖

apt-get install build-essential libcurl4-openssl-dev libssl-dev

当然你得配置你的git

git config --global user.email "youemail@test.com"  git config --global user.name "your_name"

二:获取源代码

git clone https://github.com/GangZhuo/BaiduPCS.git

三:编译

1. 便宜前

在执行 sudo make clean的时候,会发生错误而无法进行下去 WARNING: 'aclocal-1.15' is missing on your system 先执行

cd 【你的BaiduPCS的目录】

sudo autoreconf -ivf 2. 执行configure

sudo ./configure

3. make

make clean make 4. install

make install #将安装到/usr/local/bin下,名字为baidupcs 四:使用

1. help

baidupcs -h 2. 登陆

baidupcs --username=xxxxxx --password='xxxxx'

3. 退出

baidupcs logout

3. 列举

baidupcs list 4. 变换目录,类似Linux的cd

baidupcs cd /one_dir/two_dir/three_dir 5. 下载文件

baidupcs download -f /one_dir/two_dir/three_dir/111.tar /home/baijinwen/develop/111.tar说明:

/one_dir/two_dir/three_dir/111.tar   表示百度云的路径 /home/baijinwen/develop/111.tar    表示linux本地的文件路径

6. 上传文件

baidupcs upload ~/data.tar.gz /backup/data.20140118.tar.gz

转载请注明原文地址: https://www.6miu.com/read-67433.html

最新回复(0)