on
瑞兹 发表于 2020-10-26 09:07浏览次数:
在Solaris操作系统上,on命令在远程系统上使用本地环境执行命令
On the Solaris operating system, the on command executes a command on a remote system, but with the local environment.
目录:
1 on 运行系统环境
2 on 语法
3 on 例子
on 运行系统环境
on 语法
on [ -i ] [ -d ] [ -n ] host-command [argument]
选件
-i
|
互动模式。使用远程回显和特殊字符处理。对于希望与终端通信的程序,此选项是必需的。传播所有终端模式和窗口大小更改。
|
-d
|
调试模式。在完成工作时打印一些消息。
|
-n
|
无输入。此选项使远程程序从标准输入读取时获得EOF,而不是从打开的程序的标准输入传递标准输入。例如,在带有作业控制的后台运行命令时,-n是必需的。
|
host-command
|
您要执行的主机命令。
|
argument
|
附加参数。
|
on [ -i ] [ -d ] [ -n ] host-command [argument]
Options
-i
|
Interactive mode. Use remote echoing and special character processing. This option is needed for programs that expect to be talking to a terminal. All terminal modes and window size changes are propagated.
|
-d
|
Debug mode. Print out some messages as work is being done.
|
-n
|
No Input. This option causes the remote program to get EOF when it reads from the standard input, instead of passing the standard input from the standard input of the on program. For example, -n is necessary when running commands in the background with job control.
|
host-command
|
The host command that you want to execute.
|
argument
|
Additional arguments.
|
on 例子
on computerhope.com ls
在
computerhope.com域上运行
ls命令。
on computerhope.com ls
Runs the
ls command on the domain
computerhope.com.