Cu
来自 ChinaUnix Wiki
Linux命令:cu
功能说明:连接另一个系统主机。
语 法:cu [dehnotv][-a<通信端口>][-c<电话号码>][-E<脱离字符>][-I<设置文件>][-l<外围设备代号>][-s<连线速率>][-x<排错模式>][-z<系统主机>][--help][-nostop][--parity=none][<系统主机>/<电话号码>]
补充说明:本指令可连接另一台主机,并采用类似拨号终端机的接口工作,也可执行简易的文件传输作业。
参 数: -a<通信端口>或-p<通信端口>或--port<通信端口> 使用指定的通信端口进行连线。 -c<电话号码>或--phone<电话号码> 拨打该电话号码。 -d 进入排错模式。 -e或--parity=even 使用双同位检查。 -E<脱离字符>或--escape<脱离字符> 设置脱离字符。 -h或--halfduple 使用半双工模式。 -I<配置文件>或--config<配置文件> 指定要使用的配置文件。 -l<外围设备代号>或--line<外围设备代号> 指定某项外围设备,作为连接的设备。 -n或--prompt 拨号时等待用户输入电话号码。 -o或--parity=odd 使用单同位检查。 -s<连线速率>或--speed<连线速率>或--baud<连线速率>或-<连线速率> 设置连线的速率,单位以鲍率计算。 -t或--maper 把CR字符置换成LF+CR字符。 -v或--version 显示版本信息。 -x<排错模式>或--debug<排错模式> 使用排错模式。 -z<系统主机>或--system<系统主机> 连接该系统主机。 --help 在线帮助。 --nostop 关闭Xon/Xoff软件流量控制。 --parity=none 不使用同位检查。
英文版本,欢迎翻译:
ABOUT CU
Calls or connects to another UNIX system, terminal or non-UNIX system.
SYNTAX
cu [-c device | -l line ] [ -s speed ] [ -b bits ] [ -h] [ -n ] [ -t ] [ -d ] [-o | -e ] [ -L ] [ -C ] [ -H] telno | systemname [ local-cmd ]
-c device Force cu to use only entries in the "Type" field (the first field in the /etc/uucp/Devices file) that match the user specified device, usually the name of a local area network. -l line Specify a device name to use as the communication line. This can be used to override the search that would otherwise take place for the first available line having the right speed. When the -l option is used without the -s option, the speed of a line is taken from the /etc/uucp/Devices file record in which line matches the second field (the Line field). When the -l and -s options are both used together, cu will search the /etc/uucp/Devices file to check if the requested speed for the requested line is available. If so, the connection will be made at the requested speed, otherwise, an error message will be printed and the call will not be made. In the general case where a specified device is a directly connected asynchronous line (for instance, /dev/term/a), a telephone number (telno) is not required. The specified device need not be in the /dev directory. If the specified device is associated with an auto dialer, a telephone number must be provided. -s speed Specify the transmission speed (300, 1200, 2400, 4800, 9600, 19200, 38400). The default value is "Any" speed which will depend on the order of the lines in the /etc/uucp/Devices file. -b bits Force bits to be the number of bits processed on the line. bits is either 7 or 8. This allows connection between systems with different character sizes. By default, the character size of the line is set to the same as the current local terminal. -h Set communication mode to half-duplex. This option emulates local echo in order to support calls to other computer systems that expect terminals to be set to half-duplex mode. -n Request user prompt for telephone number. For added security, this option will prompt the user to provide the telephone number to be dialed, rather than taking it from the command line. -t Dial a terminal which has been set to auto answer. Appropriate mapping of carriage-return to carriage-return-line-feed pairs is set. -d Print diagnostic traces. -o Set an ODD data parity. This option designates that ODD parity is to be generated for data sent to the remote system. -e Set an EVEN data parity. This option designates that EVEN parity is to be generated for data sent to the remote system. -L Go through the login chat sequence specified in the /etc/uucp/Systems file. For more information about the chat sequence, see TCP/IP and Data Communications Administration Guide -C Run the local-cmd specified at the end of the command line instead of entering interactive mode. The stdin and stdout of the command that is run refer to the remote connection. -H Ignore one hangup. This allows the user to remain in cu while the remote machine disconnects and places a call back to the local machine. This option should be used when connecting to systems with callback or dialback modems. Once the call- back occurs subsequent hangups will cause cu to terminate. This option can be specified more than once. For more information about dialback configuration, see remote(4) and TCP/IP and Data Communications Administration Guide telco When using an automatic dialler, specifies the telephone number with equal signs for secondary dial tone or minus signs placed appropriately for delays of 4 seconds. systemname Specifies a uucp system name, which can be used rather than a telephone number; in this case, cu will obtain an appropriate direct line or telephone number from a system file.
EXAMPLES
cu -s 38400 9=12015551234 - dials a system who's phone number is (201) 555-1235. This example is also using a 9 to get out of the building as well as a 1 to dial long distance.
