本文主要是介绍pcduino安装rzsz,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
有时候传一些小文件rz sz命令还是非常有效的。也许是一种习惯吧。下面我就介绍一下如何安装rzsz
1.下载软件 rzsz-3.48.tar.gz
root@ubuntu:~# wget http://freeware.sgi.com/source/rzsz/rzsz-3.48.tar.gz
Resolving freeware.sgi.com (freeware.sgi.com)... 192.48.178.134
Connecting to freeware.sgi.com (freeware.sgi.com)|192.48.178.134|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 65566 (64K) [application/x-gzip]
Saving to: `rzsz-3.48.tar.gz'
0% [ ] 0 --.-K/s
10% [===> ] 6,840 23.9K/s
18% [======> ] 12,312 21.5K/s
43% [================> ] 28,728 33.2K/s
56% [====================> ] 36,920 27.2K/s
100%[======================================>] 65,566 48.2K/s in 1.3s
2013-09-23 04:33:35 (48.2 KB/s) - `rzsz-3.48.tar.gz' saved [65566/65566]
#tar zxf rzsz-3.48.tar.gz
解压后会出现src目录
3.修改Makefile
#cd src
修改OFLAG= -O -DREGISTERED
否则执行时会出现:
**** UNREGISTERED COPY *****
Please read the License Agreement in rz.doc
4.编译
#make posix
cc -O -DREGISTERED -DPOSIX -DMD=2 rz.c -o rz
rz.c: In function ‘zperr1’:
rz.c:187:2: warning: format not a string literal and no format arguments [-Wformat-security]
rz.c: In function ‘procheader’:
rz.c:655:5: warning: format ‘%lo’ expects argument of type ‘long unsigned int *’, but argument 6 has type ‘int *’ [-Wformat]
rz.c:655:5: warning: format ‘%d’ expects argument of type ‘int *’, but argument 7 has type ‘long int *’ [-Wformat]
rz.c: In function ‘exec2’:
rz.c:1361:2: warning: missing sentinel in function call [-Wformat]
size rz
text data bss dec hex filename
22294 644 10492 33430 8296 rz
rm -f rb rx rc
ln rz rb
ln rz rx
ln rz rc
cc -O -DREGISTERED -DPOSIX sz.c -o sz
sz.c: In function ‘zperr1’:
sz.c:233:2: warning: format not a string literal and no format arguments [-Wformat-security]
sz.c: In function ‘main’:
sz.c:427:4: warning: format not a string literal and no format arguments [-Wformat-security]
sz.c: In function ‘zsendfdata’:
sz.c:1346:5: warning: format not a string literal and no format arguments [-Wformat-security]
sz.c: In function ‘zsendcmd’:
sz.c:1590:10: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
size sz
text data bss dec hex filename
28915 724 43372 73011 11d33 sz
rm -f sb sx zcommand zcommandi
ln sz sb
ln sz sx
ln sz zcommand
ln sz zcommandi
5.使用
可以在本地使用 ..src#./rz
可以将可执行文件rz sz拷贝到/bin目录下 #cp rz bin/ 可以直接使用#rz命令
也可以将本地目录添加到环境变量 #export PATH=$PATH:/home/ubuntu/src/ 然后就可以使用#rz 了
这篇关于pcduino安装rzsz的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!