test configuration
语法
test configuration filename syntax-only
描述
验证配置文件的语法是否正确。如果配置包含任何语法或提交检查错误,则会显示一条消息,指示在其中找到错误的行号和列号。使用该 filename 选项时,此命令仅接受文本文件。
选项
filename | 配置文件的名称。此文件必须是文本文件,不能是其他类型。 |
syntax-only | (可选)检查部分配置文件的语法,而不检查提交错误。 |
所需权限级别
视图
输出字段
输入此命令时,系统会提供有关请求状态的反馈。
示例输出
测试配置
user@host> test configuration terminal [Type ^D to end input] system { host-name host; test1; login; } terminal:3:(8) syntax error: test [edit system] 'test;' syntax error terminal:4:(11) statement must contain additional statements: ; [edit system login] 'login ;' statement must contain additional statements configuration syntax failed
发布信息
在 Junos OS 7.4 版之前引入的命令。
syntax-only
Junos OS 12.1 版中引入的选项。