出 处: rose.dlut.edu.cn
发信人: [email protected] (Shih-Kun Huang), 信区: Unix 标 题: Re: ** 请问 rcp ????? 发信站: 交大资工天龙新闻社(by nbbstin) (Sun Aug 28 05:09:53 1994) 转信站: Palmarama!netnews.ntu!news.csie.nctu!skhuang
[email protected] 提到: : 使用 rcp 结果 出现如下讯息 : stty: TCGETS: operation not supported on socket : 请问 如何解决这个问题 ? 你必须小心处理以下列在 .cshrc, .profile 等 file 之 command: "echo", "stty", "biff"
这些命令都必须在有 tty 时才能正常, 但 rcp 并不会 dup socket fd 到 tty(pty). 最简单的解决方法是拿掉所有在 .cshrc, .tcshrc, . bashrc, .profile,.... 等启始档的 echo, stty, biff 命令.
假使这些命令是必要的, 以 csh, 或 tcsh 为例: 1. 能放到 .login 者, 尽量放到 .login, 2. 把所有 echo, stty, biff 等 command, 以下列方式执行:
if { test -t 0 } then stty ..... echo ..... biff y ...... endif
对 tcsh, 用 builtin file inquery 较快: if ( -t 0 ) then stty .. echo .. .... endif
对其它 shells, 若无 -t test function, 例用 "test -t 0", "[ -t 0 ]"....
if [ -t 0 ]; then stty .. echo .. ... fi -- Shih-Kun Huang EC638, CSIE, NCTU, Taiwan, R.O.C. Phone: 886-35-712121 (x54709) E-mail: [email protected] BBS: [email protected] WWW URL Welcome to CSIE WWW server -- ☆ [Origin: ◎椰林风情◎] [From: woju.g1.ntu.edu.tw ] [Login: **] [Post: **]
-- ※ 来源:.碧海青天 bbs.dlut.edu.cn.[FROM: 202.118.65.49]
|
|