BusyBox v1.20.0命令介绍(二)

/*********************************************************************
* Author          :     lile
* Modified        :     2019年12月28日星期六  10:56:13
* Email           :     [email protected]
* HomePage        :     lile777.blog.csdn.net
* CopyRight       :     该文章版权由lile所有。
*                       保留原文出处链接和本声明的前提下,可在非商业目的下任意传播和复制。
*                       对于商业目的下对本文的任何行为需经作者同意。
*********************************************************************/

51. freeramdisk – 释放指定的ramdisk

root@android:/ # busybox-smp freeramdisk --help 
BusyBox v1.20.0 (2012-08-22 21:36:24 CDT) multi-call binary.

Usage: freeramdisk DEVICE

Free all memory used by the specified ramdisk

52. ftpd – Anonymous FTP server[★★★]

root@android:/ # busybox-smp ftpd --help 
BusyBox v1.20.0 (2012-08-22 21:36:24 CDT) multi-call binary.

Usage: ftpd [-wvS] [-t N] [-T N] [DIR]

Anonymous FTP server

ftpd should be used as an inetd service.
ftpd's line for inetd.conf:
	21 stream tcp nowait root ftpd ftpd /files/to/serve
It also can be ran from tcpsvd:
	tcpsvd -vE 0.0.0.0 21 ftpd /files/to/serve

	-w	Allow upload
	-v	Log errors to stderr. -vv: verbose log
	-S	Log errors to syslog. -SS: verbose log
	-t,-T	Idle and absolute timeouts
	DIR	Change root to this directory

53. ftpget – FTP下载命令[★★]

root@android:/ # busybox-smp ftpget --help 
BusyBox v1.20.0 (2012-08-22 21:36:24 CDT) multi-call binary.

Usage: ftpget [OPTIONS] HOST [LOCAL_FILE] REMOTE_FILE

Download a file via FTP

	-c,--continue		Continue previous transfer
	-v,--verbose		Verbose
	-u,--username USER	Username
	-p,--password PASS	Password
	-P,--port NUM		Port

54. ftpput – FTP上传命令[★★]

root@android:/ # busybox-smp  ftpput --help 
BusyBox v1.20.0 (2012-08-22 21:36:24 CDT) multi-call binary.

Usage: ftpput [OPTIONS] HOST [REMOTE_FILE] LOCAL_FILE

Upload a file to a FTP server

	-v,--verbose		Verbose
	-u,--username USER	Username
	-p,--password PASS	Password
	-P,--port NUM		Port

55. fuser – 找出文件的占用进程/端口[★]

root@android:/ # busybox-smp fuser --help 
BusyBox v1.20.0 (2012-08-22 21:36:24 CDT) multi-call binary.

Usage: fuser [OPTIONS] FILE or PORT/PROTO

Find processes which use FILEs or PORTs

	-m	Find processes which use same fs as FILEs
	-4,-6	Search only IPv4/IPv6 space
	-s	Don't display PIDs
	-k	Kill found processes
	-SIGNAL	Signal to send (default: KILL)

56. getopt – 参数解析命令[★★]

root@android:/ # busybox-smp getopt --help 
BusyBox v1.20.0 (2012-08-22 21:36:24 CDT) multi-call binary.

Usage: getopt [OPTIONS] [--] OPTSTRING PARAMS

	-a,--alternative		Allow long options starting with single -
	-l,--longoptions=LOPT[,...]	Long options to be recognized
	-n,--name=PROGNAME		The name under which errors are reported
	-o,--options=OPTSTRING		Short options to be recognized
	-q,--quiet			Disable error reporting by getopt(3)
	-Q,--quiet-output		No normal output
	-s,--shell=SHELL		Set shell quoting conventions
	-T,--test			Test for getopt(1) version
	-u,--unquoted			Don't quote the output

Example:

O=`getopt -l bb: -- ab:c:: "$@"` || exit 1
eval set -- "$O"
while true; do
	case "$1" in
	-a)	echo A; shift;;
	-b|--bb) echo "B:'$2'"; shift 2;;
	-c)	case "$2" in
		"")	echo C; shift 2;;
		*)	echo "C:'$2'"; shift 2;;
		esac;;
	--)	shift; break;;
	*)	echo Error; exit 1;;
	esac
done

57. getty – 终端工具

root@android:/ # busybox-smp getty --help 
BusyBox v1.20.0 (2012-08-22 21:36:24 CDT) multi-call binary.

Usage: getty [OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]

Open TTY, prompt for login name, then invoke /bin/login

	-h		Enable hardware RTS/CTS flow control
	-L		Set CLOCAL (ignore Carrier Detect state)
	-m		Get baud rate from modem's CONNECT status message
	-n		Don't prompt for login name
	-w		Wait for CR or LF before sending /etc/issue
	-i		Don't display /etc/issue
	-f ISSUE_FILE	Display ISSUE_FILE instead of /etc/issue
	-l LOGIN	Invoke LOGIN instead of /bin/login
	-t SEC		Terminate after SEC if no login name is read
	-I INITSTR	Send INITSTR before anything else
	-H HOST		Log HOST into the utmp file as the hostname

BAUD_RATE of 0 leaves it unchanged

58. hd – 查看“二进制”文件的十六进制编码

root@android:/ # busybox-smp hd --help 
BusyBox v1.20.0 (2012-08-22 21:36:24 CDT) multi-call binary.

Usage: hd
  • 2
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值