Windows

Windows

(1) Windows 上传/下载 Linux 文件?

直接搜索 winscp

(2) Windows 远程连接 Linux?

直接搜索 PuTTY

命令行

Windows 所有命令

https://jpsoft.com/help/commandnames.htm

注释

1
2
rem This batch file provides a
rem menu-based system.

检查路径是否存在

1
if not exist "%ROCKETMQ_HOME%\bin\tools.cmd" echo Please set the ROCKETMQ_HOME variable in your environment! & EXIT /B 1

退出

1
EXIT /B 1
  • /B: Exit the current batch file, rather than the shell. This switch is for compatibility with CMD.

执行脚本

1
call "%ROCKETMQ_HOME%\bin\tools.cmd" org.apache.rocketmq.tools.command.MQAdminStartup %*

检查错误码

1
2
3
IF %ERRORLEVEL% EQU 0 (
ECHO "Broker starts OK"
)

运行程序

1
START /B mqbroker -n localhost:9876 > bk.log 2>&1
  • \B: The program is started without creating a new window or console, i.e. in the TCC window. Normally, the application is started in its own window. For compatibility with CMD, /B also disables Ctrl-C processing for the program.

% 符号的意义

  • The percent sign is used in batch files to represent 命令行参数: %1, %2, …
  • Two percent signs with any characters in between them are interpreted as a 变量: echo %myvar%
  • Two percent signs without anything in between (in a batch file) are treated like a 单独的% in a command (not a batch file): %%f

装机

推荐文章