当前位置:文档之家› ipmitool工具常用命令汇总

ipmitool工具常用命令汇总

ipmitool工具常用命令汇总
ipmitool工具常用命令汇总

i p m i t o o l工具常用命令汇总目录

1.工具的安装

yum install -y OpenIPMI ipmitool

开启服务

/etc/ipmi status

/etc/ipmi start

[root@cell83 ~]# ipmitool -V

ipmitool

2.命令的help

明细的命令参考man ipmitool

或者附件

[root@cell83 ~]# ipmitool -h

ipmitool

usage: ipmitool [options...]

-h This help

-V Show version information

-v Verbose (can use multiple times)

-c Display output in comma separated format

-d N Specify a /dev/ipmiN device to use (default=0)

-I intf Interface to use

-H hostname Remote host name for LAN interface

-p port Remote RMCP port [default=623]

-U username Remote session username

-f file Read remote session password from file

-z size Change Size of Communication Channel (OEM)

-S sdr Use local file for remote SDR cache

-D tty:b[:s] Specify the serial device, baud rate to use

and, optionally, specify that interface is the system one

-4 Use only IPv4

-6 Use only IPv6

-a Prompt for remote password

-Y Prompt for the Kg key for IPMIv2 authentication

-e char Set SOL escape character

-C ciphersuite Cipher suite to be used by lanplus interface

-k key Use Kg key for IPMIv2 authentication

-y hex_key Use hexadecimal-encoded Kg key for IPMIv2 authentication

-L level Remote session privilege level [default=ADMINISTRATOR] Append a '+' to use name/privilege lookup in RAKP1

-A authtype Force use of auth type NONE, PASSWORD, MD2, MD5 or OEM -P password Remote session password

-E Read password from IPMI_PASSWORD environment variable -K Read kgkey from IPMI_KGKEY environment variable

-m address Set local IPMB address

-b channel Set destination channel for bridged request

-t address Bridge request to remote target address

-B channel Set transit channel for bridged request (dual bridge) -T address Set transit address for bridge request (dual bridge) -l lun Set destination lun for raw commands

-o oemtype Setup for OEM (use 'list' to see available OEM types) -O seloem Use file for OEM SEL event descriptions

-N seconds Specify timeout for lan [default=2] / lanplus [default=1] interface

-R retry Set the number of retries for lan/lanplus interface [default=4]

Interfaces:

open Linux OpenIPMI Interface [default]

imb Intel IMB Interface

lan IPMI LAN Interface

lanplus IPMI RMCP+ LAN Interface

serial-terminal Serial Interface, Terminal Mode

serial-basic Serial Interface, Basic Mode

usb IPMI USB Interface(OEM Interface for AMI Devices) Commands:

raw Send a RAW IPMI request and print response

i2c Send an I2C Master Write-Read command and print response spd Print SPD info from remote I2C device

lan Configure LAN Channels

chassis Get chassis status and set power state

power Shortcut to chassis power commands

event Send pre-defined events to MC

mc Management Controller status and global enables

sdr Print Sensor Data Repository entries and readings

sensor Print detailed sensor information

fru Print built-in FRU and scan SDR for FRU locators

gendev Read/Write Device associated with Generic Device locators sdr

sel Print System Event Log (SEL)

pef Configure Platform Event Filtering (PEF)

sol Configure and connect Serial-over-LAN

tsol Configure and connect with Tyan Serial-over-LAN

isol Configure Serial-over-LAN

user Configure Management Controller users

channel Configure Management Controller channels

session Print session information

dcmi Data Center Management Interface

nm Node Manager Interface

sunoem OEM Commands for Sun servers

kontronoem OEM Commands for Kontron devices

picmg Run a PICMG/ATCA extended cmd

fwum Update IPMC using Kontron OEM Firmware Update Manager

firewall Configure Firmware Firewall

delloem OEM Commands for Dell systems

shell Launch interactive IPMI shell

exec Run list of commands from file

set Set runtime variable for shell and exec

hpm Update HPM components using PICMG file

ekanalyzer run FRU-Ekeying analyzer using FRU files

ime Update Intel Manageability Engine Firmware

vita Run a VITA extended cmd

lan6 Configure IPv6 LAN Channels

3.查看管理口的IP地址

[root@cell83 ~]# ipmitool -I open lan print

[root@cell83 ~]# ipmitool -I open lan print | grep IP

IP Address Source : Static Address

IP Address :

IP Header : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10 Default Gateway IP :

Backup Gateway IP :

4.管理底盘chassis配置

[root@cell83 ~]# ipmitool -I open chassis help

Chassis Commands: status, power, identify, policy, restart_cause, poh, bootdev, bootparam, selftest

查看底盘配置汇总

[root@cell83 ~]# ipmitool -I open chassis status System Power : on

Power Overload : false

Power Interlock : inactive

Main Power Fault : false

Power Control Fault : false

Power Restore Policy : previous

Last Power Event :

Chassis Intrusion : inactive

Front-Panel Lockout : inactive

Drive Fault : false

Cooling/Fan Fault : false

Sleep Button Disable : not allowed

Diag Button Disable : allowed

Reset Button Disable : not allowed

Power Button Disable : allowed

Sleep Button Disabled: false

Diag Button Disabled : true

Reset Button Disabled: false

Power Button Disabled: false

管理电源

查看当前电源状态

[root@cell83 ~]# ipmitool -I open chassis power status Chassis Power is on

打开电源

ipmitool -I open chassis power on

关闭电源

ipmitool -I open chassis power off

重启电源

ipmitool -I open chassis power cycle

重置电源

ipmitool -I open chassis power reset

其他配置

ipmitool -I open chassis power diag

ipmitool -I open chassis power soft

管理时间间隔

查询时间间隔:

[root@cell83 ~]# ipmitool -I open chassis identify

Chassis identify interval: default (15 seconds)

设置时间间隔:

[root@cell83 ~]# ipmitool -I open chassis identify help

chassis identify

default is 15 seconds

0 to turn off

force to turn on indefinitely

管理电源恢复策略

[root@cell83 ~]# ipmitool -I open chassis policy help

chassis policy

list : return supported policies

always-on : turn on when power is restored

previous : return to previous state when power is restored always-off : stay off after power is restored

查看上次重启原因

[root@cell83 ~]# ipmitool -I open chassis restart_cause

System restart cause: unknown

查询上电时间

[root@cell83 ~]# ipmitool -I open chassis poh

Get Chassis Power-On-Hours failed: Invalid command

管理启动项

[root@cell83 ~]# ipmitool -I open chassis bootdev help

bootdev [clear-cmos=yes|no]

bootdev [options=help,...]

none : Do not change boot device order

pxe : Force PXE boot

disk : Force boot from default Hard-drive

safe : Force boot from default Hard-drive, request Safe Mode diag : Force boot from Diagnostic Partition

cdrom : Force boot from CD/DVD

bios : Force boot into BIOS Setup

floppy: Force boot from Floppy/primary removable media

设置启动项的参数

[root@cell83 ~]# ipmitool -I open chassis bootparam help

bootparam get

bootparam set bootflag [options=...]

Legal devices are:

none : No override

force_pxe : Force PXE boot

force_disk : Force boot from default Hard-drive

force_safe : Force boot from default Hard-drive, request Safe Mode

force_diag : Force boot from Diagnostic Partition

force_cdrom : Force boot from CD/DVD

force_bios : Force boot into BIOS Setup

Legal options are:

help : print this message

PEF : Clear valid bit on reset/power cycle cause by PEF

timeout : Automatically clear boot flag valid bit on timeout

watchdog: Clear valid bit on reset/power cycle cause by watchdog

reset : Clear valid bit on push button reset/soft reset

power : Clear valid bit on power up via power push button or wake event Any Option may be prepended with no- to invert sense of operation

5.使用delloem进行管理

查看帮助

[root@cell83 ~]# ipmitool -I open delloem help

usage: delloem [option...]

commands:

lcd

mac

lan

setled

powermonitor

vFlash

For help on individual commands type:

delloem help

配置lcd

[root@cell83 ~]# ipmitool -I open delloem lcd help

Generic DELL HW:

lcd set {none}|{default}|{custom }

Set LCD text displayed during non-fault conditions

iDRAC 11g or iDRAC 12g or iDRAC 13g :

lcd set {mode}|{lcdqualifier}|{errordisplay}

Allows you to set the LCD mode and user-defined string.

lcd set mode {none}|{modelname}|{ipv4address}|{macaddress}|

{systemname}|{servicetag}|{ipv6address}|{ambienttemp}

{systemwatt }|{assettag}|{userdefined}

Allows you to set the LCD display mode to any of the preceding

parameters

lcd set lcdqualifier {watt}|{btuphr}|{celsius}|{fahrenheit}

Allows you to set the unit for the system ambient temperature mode.

lcd set errordisplay {sel}|{simple}

Allows you to set the error display.

lcd info

Show LCD text that is displayed during non-fault conditions

lcd set vkvm{active}|{inactive}

Set vKVM active and inactive, message will be displayed on lcd

when vKVM is active and vKVM session is in progress

lcd set frontpanelaccess {viewandmodify}|{viewonly}|{disabled}

Set LCD mode to view and modify, view only or disabled

lcd status

Show LCD Status for vKVM display

and Front Panel access mode {viewandmodify}|{viewonly}|{disabled}

查看MAC地址

[root@cell83 ~]# ipmitool -I open delloem mac help

mac list

Lists the MAC address of LOMs

mac get

Shows the MAC address of specified LOM. 0-7 System LOM, 8- DRAC/iDRAC. [root@cell83 ~]# ipmitool -I open delloem mac list

System LOMs

NIC Number MAC Address Status

0 b8:2a:72:db:56:2a Enabled

1 b8:2a:72:db:56:2b Enabled

2 b8:2a:72:db:56:28 Enabled

3 b8:2a:72:db:56:29 Enabled

iDRAC7 MAC Address b0:83:fe:c9:6d:31

设置lan的模式

[root@cell83 ~]# ipmitool -I open delloem lan help

lan set

sets the NIC Selection Mode :

on iDRAC12g OR iDRAC13g :

dedicated, shared with lom1, shared with lom2,shared with lom3,shared

with lom4,shared with failover lom1,shared with failover lom2,shared

with failover lom3,shared with failover lom4,shared with Failover all

loms, shared with Failover None).

on other systems :

dedicated, shared, shared with failover lom2,

shared with Failover all loms.

lan get

on iDRAC12g or iDRAC13g :

returns the current NIC Selection Mode (dedicated, shared with lom1, shared

with lom2, shared with lom3, shared with lom4,shared with failover lom1,

shared with failover lom2,shared with failover lom3,shared with failover

lom4,shared with Failover all loms,shared with Failover None). on other systems :

dedicated, shared, shared with failover,

lom2, shared with Failover all loms.

lan get active

returns the current active NIC (dedicated, LOM1, LOM2, LOM3, LOM4).

设置背板led的状态

[root@cell83 ~]# ipmitool -I open delloem setled help

setled

Set backplane LED state

b: = PCI Bus: of drive (lspci format)

state = present|online|hotspare|identify|rebuilding|

fault|predict|critical|failed

管理电源监控

[root@cell83 ~]# ipmitool -I open delloem powermonitor help

powermonitor

Shows power tracking statistics

powermonitor clear cumulativepower

Reset cumulative power reading

powermonitor clear peakpower

Reset peak power reading

powermonitor powerconsumption

Displays power consumption in

powermonitor powerconsumptionhistory

Displays power consumption history

powermonitor getpowerbudget

Displays power cap in

powermonitor setpowerbudget

Allows user to set the power cap in powermonitor enablepowercap

To enable set power cap

powermonitor disablepowercap

To disable set power cap

6.查看传感器数据sensor

[root@cell83 ~]# ipmitool -I open sensor help

Sensor Commands: list thresh get reading

查看当前系统所有的传感器数据

[root@cell83 ~]# ipmitool -I open sensor list

设置传感器的告警阈值

[root@cell83 ~]# ipmitool -I open sensor thresh help

sensor thresh

id : name of the sensor for which threshold is to be set threshold : which threshold to set

unr = upper non-recoverable

ucr = upper critical

unc = upper non-critical

lnc = lower non-critical

lcr = lower critical

lnr = lower non-recoverable

setting : the value to set the threshold to

sensor thresh lower

Set all lower thresholds at the same time

sensor thresh upper

Set all upper thresholds at the same time

查看某一传感器的状态信息

[root@cell83 ~]# ipmitool -I open sensor get help

sensor get ... [id]

id : name of desired sensor

查看温度传感器

[root@cell83 ~]# ipmitool -I open sensor get Temp

Locating sensor record...

Sensor ID : Temp (0xe)

Entity ID :

Sensor Type (Threshold) : Temperature

Sensor Reading : 48 (+/- 1) degrees C

Status : ok

Lower Non-Recoverable : na

Lower Critical :

Lower Non-Critical :

Upper Non-Critical :

Upper Critical :

Upper Non-Recoverable : na

Positive Hysteresis :

Negative Hysteresis :

Assertion Events :

Assertions Enabled :

查看某一个传感器的当前值

[root@cell83 ~]# ipmitool -I open sensor reading help sensor reading ... [id]

id : name of desired sensor

查看温度传感器

[root@cell83 ~]# ipmitool -I open sensor reading Temp

Temp | 47

7.管理传感器仓库sdr

[root@cell83 ~]# ipmitool -I open sdr help

usage: sdr [options]

list | elist [option]

all All SDR Records

full Full Sensor Record

compact Compact Sensor Record

event Event-Only Sensor Record

mcloc Management Controller Locator Record

fru FRU Locator Record

generic Generic Device Locator Record

type [option]

Retrieve the state of specified sensor. Sensor_Type can be specified either as

a string or a hex value.

list Get a list of available sensor types

get

Retrieve state of the first sensor matched by Sensor_ID info

Display information about the repository itself

entity [.]

Display all sensors associated with an entity

dump

Dump raw SDR data to a file

fill

sensors Creates the SDR repository for the current configuration

nosat Creates the SDR repository for the current

configuration, without satellite scan

file Load SDR repository from a file

range Load SDR repository from a provided list or range. Use ',' for list or '-' for

range, eg. 0x28,0x32,0x40-0x44

查看传感器仓库中的信息列表

[root@cell83 ~]# ipmitool -I open sdr elist help

usage: sdr elist [all|full|compact|event|mcloc|fru|generic]

=>查看仓库中所有的信息:elist和list的格式内容上略有不同

[root@cell83 ~]# ipmitool -I open sdr elist all

[root@cell83 ~]# ipmitool -I open sdr list all

=>查看传感器的数据

[root@cell83 ~]# ipmitool -I open sdr elist full

Fan1 RPM | 30h | ok | | 6240 RPM

Fan2 RPM | 31h | ok | | 6240 RPM

Fan3 RPM | 32h | ok | | 6240 RPM

Fan4 RPM | 33h | ok | | 6120 RPM

Fan5 RPM | 34h | ok | | 6240 RPM

Fan6 RPM | 35h | ok | | 6240 RPM

Inlet Temp | 04h | ok | | 35 degrees C

Exhaust Temp | 01h | ok | | 40 degrees C

Temp | 0Eh | ok | | 47 degrees C

Temp | 0Fh | ok | | 46 degrees C

Current 1 | 6Ah | ok | | Amps

Current 2 | 6Bh | ns | | No Reading

Voltage 1 | 6Ch | ok | | 236 Volts

Voltage 2 | 6Dh | ns | | No Reading

Pwr Consumption | 77h | ok | | 168 Watts

说明:

Fan ----表示风扇

Inlet Temp ----进口温度

Exhaust Temp ----出口温度

Temp ----CPU的温度

Current --电流

Voltage ---电压

Pwr Consumption ----功率

查看传感器的类型和指定类型的数据

查看传感器有哪些类型

[root@cell83 ~]# ipmitool -I open sdr type list

Sensor Types:

Temperature (0x01) Voltage (0x02) Current (0x03) Fan (0x04) Physical Security (0x05) Platform Security (0x06) Processor (0x07) Power Supply (0x08) Power Unit (0x09) Cooling Device (0x0a) Other (0x0b) Memory (0x0c) Drive Slot / Bay (0x0d) POST Memory Resize (0x0e) System Firmwares (0x0f) Event Logging Disabled (0x10) Watchdog1 (0x11) System Event (0x12) Critical Interrupt (0x13) Button (0x14) Module / Board (0x15) Microcontroller (0x16) Add-in Card (0x17) Chassis (0x18) Chip Set (0x19) Other FRU (0x1a) Cable / Interconnect (0x1b) Terminator (0x1c) System Boot Initiated (0x1d) Boot Error (0x1e) OS Boot (0x1f) OS Critical Stop (0x20) Slot / Connector (0x21) System ACPI Power State (0x22) Watchdog2 (0x23) Platform Alert (0x24) Entity Presence (0x25) Monitor ASIC (0x26) LAN (0x27) Management Subsys Health (0x28) Battery (0x29) Session Audit (0x2a) Version Change (0x2b) FRU State (0x2c) 查看指定传感器的数据

如查看温度:

[root@cell83 ~]# ipmitool -I open sdr type Temperature

Inlet Temp | 04h | ok | | 35 degrees C

Exhaust Temp | 01h | ok | | 40 degrees C

Temp | 0Eh | ok | | 46 degrees C

Temp | 0Fh | ok | | 47 degrees C

如查看电源的个数1:有一个电源

[root@cell83 dvd]# ipmitool -I open sdr type "Power Supply"

PS Redundancy | 74h | ns | | No Reading

Status | 62h | ok | | Presence detected

Status | 63h | ns | | Disabled

如查看电源的个数2:有四个电源

[root@db04 ~]# ipmitool -I open sdr type "Power Supply"

PS Redundancy | 74h | ok | | Redundancy Lost

Status | 62h | ok | | Presence detected

Status | 63h | ok | | Presence detected, Power Supply AC lost Status | 52h | ok | | Presence detected, Config Error, Power Supply Inactive

Status | 53h | ok | | Presence detected, Config Error, Power Supply Inactive

查看指定传感器的配置信息

[root@cell83 ~]# ipmitool -I open sdr get Temp

Sensor ID : Temp (0xe)

Entity ID : (Processor)

Sensor Type (Threshold) : Temperature (0x01)

Sensor Reading : 47 (+/- 1) degrees C

Status : ok

Nominal Reading :

Normal Minimum :

Normal Maximum :

Upper critical :

Upper non-critical :

Lower critical :

Lower non-critical :

Positive Hysteresis :

Negative Hysteresis :

Minimum sensor range : Unspecified

Maximum sensor range : Unspecified

Event Message Control : Per-threshold

Readable Thresholds : No Thresholds

Settable Thresholds : No Thresholds

Assertion Events :

Assertions Enabled :

查看传感器仓库sdr的配置信息

[root@cell83 ~]# ipmitool -I open sdr info

SDR Version : 0x51

Record Count : 170

Free Space : 1836 bytes

Most recent Addition : 02/07/2106 06:28:15

Most recent Erase : 02/07/2106 06:28:15

SDR overflow : no

SDR Repository Update Support : modal

Delete SDR supported : no

Partial Add SDR supported : no

Reserve SDR repository supported : yes

SDR Repository Alloc info supported : no

8.查看系统事件sel日志

[root@cell83 ~]# ipmitool -I open sel help

SEL Commands: info clear delete list elist get add time save readraw writeraw interpret

查看sel的状态信息

[root@cell83 ~]# ipmitool -I open sel info help

SEL Information

Version : , v2 compliant)

Entries : 740

Free Space : 4544 bytes

Percent Used : 72%

Last Add Time : 08/27/2018 08:48:29

Last Del Time : 09/13/2014 11:16:12

Overflow : false

Supported Cmds : 'Reserve'

查看sel的中的日志信息

ipmitool -I open sel list | elist

When this command is invoked without arguments, the entire contents of the System Event Log are displayed. If invoked as elist (extended list) it will also use the Sensor Data Record entries to display the sensor ID for

the sensor that caused each event. Note this can take a long time over the system interface.

| first

Displays the first count (least-recent) entries in the SEL. If count is zero, all entries are displayed.

last

Displays the last count (most-recent) entries in the SEL. If count is zero, all entries are displayed.

查看前5条

[root@cell83 ~]# ipmitool -I open sel elist first 5

1 | 09/13/2014 | 11:16:1

2 | Event Logging Disabled SEL | Log area reset/cleared | Asserted

2 | 10/15/2014 | 13:42:04 | Physical Security Intrusion | General Chassis intrusion () | Asserted

3 | 10/15/201

4 | 13:42:09 | Physical Security Intrusion | General Chassis intrusion () | Deasserted

4 | 10/16/2014 | 12:08:20 | Physical Security Intrusion | General Chassis intrusion () | Asserted

5 | 10/16/2014 | 12:08:49 | Physical Security Intrusion | General Chassis intrusion () | Deasserted

查看后5条

[root@cell83 ~]# ipmitool -I open sel elist last 5

2e0 | 08/02/2018 | 01:45:10 | Physical Security Intrusion | General Chassis intrusion () | Deasserted

2e1 | 08/04/2018 | 04:11:34 | OS Boot | Installation started | Asserted

2e2 | 08/04/2018 | 04:21:03 | OS Boot | Installation completed | Asserted 2e3 | 08/27/2018 | 08:48:24 | Physical Security Intrusion | General Chassis intrusion () | Asserted

2e4 | 08/27/2018 | 08:48:29 | Physical Security Intrusion | General Chassis intrusion () | Deasserted

H3C交换机配置命令

H3C交换机配置命令 创建汇聚组link-aggregation group mode{manual / static} 加入端口Port link-aggregation group 汇聚接口配置interface Bridge-Aggregation 1 description ==TO-IDF-1== port link-type trunk undo port trunk permit vlan 1 port trunk permit vlan 21 100 (1)采用手工聚合方式 # 创建汇聚组1。 [H3C] link-aggregation group 1 mode manual # 将以太网端口Ethernet2/1/1至Ethernet2/1/3加入聚合组1。 [H3C] interface ethernet2/1/1 [H3C-Ethernet2/1/1] port link-aggregation group 1 [H3C-Ethernet2/1/1] interface ethernet2/1/2 [H3C-Ethernet2/1/2] port link-aggregation group 1 [H3C-Ethernet2/1/2] interface ethernet2/1/3

[H3C-Ethernet2/1/3] port link-aggregation group 1 # 当聚合组端口序号连续时,可以直接把多个端口聚成一组,组号由系统自行分 配。 [H3C] link-aggregation ethernet2/1/1 to ethernet2/1/3 both (2)采用静态LACP聚合方式 # 创建静态汇聚组1。 [H3C] link-aggregation group 1 mode static # 将以太网端口Ethernet2/1/1至Ethernet2/1/3加入聚合组1。 [H3C] interface ethernet2/1/1 [H3C-Ethernet2/1/1] port link-aggregation group 1 [H3C-Ethernet2/1/1] interface ethernet2/1/2 [H3C-Ethernet2/1/2] port link-aggregation group 1 [H3C-Ethernet2/1/2] interface ethernet2/1/3 [H3C-Ethernet2/1/3] port link-aggregation group 1 (3)采用动态LACP聚合方式 # 开启以太网端口Ethernet2/1/1至Ethernet2/1/3的LACP协议。 [H3C] interface ethernet2/1/1 [H3C-Ethernet2/1/1] lacp enable [H3C-Ethernet2/1/1] interface ethernet2/1/2 [H3C-Ethernet2/1/2] lacp enable [H3C-Ethernet2/1/2] interface ethernet2/1/3 [H3C-Ethernet2/1/3] lacp enable 设置以太网端口的速率speed { 10 | 100 | 1000 | 10000 | auto } 设置以太网端口连接的网线的类型mdi { across | auto | normal }

CRT常用命令

SecureCRT 常用命令 2010年4月26日 | 分类: Linux | 标签: SecureCRT 常用命令: 一、ls 只列出文件名(相当于dir,dir也可以使用) -A:列出所有文件,包含隐藏文件。 -l:列表形式,包含文件的绝大部分属性。 -R:递归显示。 –help:此命令的帮助。 二、cd 改变目录 cd /:进入根目录 cd :回到自己的目录(用户不同则目录也不同,root为/root,xxt为/home/xxt cd ..:回到上级目录 pwd:显示当前所在的目录 三.less 文件名:查看文件内容。 四.q 退出打开的文件。 五.上传文件: rz 选择要传送的文件,确定。 六.下载文件: sz 指定文件名,enter敲,即下载到了secureCRT/download目录下。 七:删除文件: rm 删除文件,rmdir 删除空目录。 八.显示最近输入的20条命令:history 20 九.获得帮助命令–help查看命令下详细参数:如:rz –help , sz –help 。 十.cd 进入某个文件夹的命令: mkdir+文件夹名创建某个文件夹的命令 sz+文件名从服务器端向本机发送文件的命令 rz 从本机向服务器端传送文件的命令 ll 列出当前目录下的所有文件,包括每个文件的详细信息 dir 对当前文件夹 vi 打开当前文件 十一.在编辑某个文件的时候: a 切换到编辑模式 ctrl+c 退出编辑模式

dd 删除整行 :q 退出当前文件 :w 写入并保存当前文件 -f 强行xx的参数。。。 其它命令: 1.ps -ef //查看server的进程,以列表形式显示的server进程。 ps 显示当前在系统运行的进程 /usr/bin/ps [选项] -e 显示每个现在运行的进程 -f 生成一个完全的列表 实际操作: ————————————– 1 SSH客户端连接到10.5.1.55系统(参见《启动远程客户端说明SecureCRT.doc》) $ cd /home/bea2/user_projects/csdomain/bin 2 查看weblogic92服务进程 $ ps -eaf | grep weblogic bea2 327926 331940 0 13:08:45 pts/4 0:00 grep weblogic webadmin 421908 368956 0 Sep 24 - 4:13 /usr/java5_64/bin/java -Xms256m -Xmx512m -da -Dplatform.home=/home/weblogic/bea/weblogic92 -Dwls.home=/home/weblogic/bea/weblogic92/server -Dwli.home=/home/weblogic/bea/weblogic92/integration -Dweblogic.management.discover=true -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=/home/weblogic/bea/patch_weblogic923/profiles/de fault/sysext_manifest_classpath https://www.doczj.com/doc/2a561975.html,=AdminServer -Djava.security.policy=/home/weblogic/bea/weblogic92/server/lib/webl ogic.policy weblogic.Server bea2 491796 385044 17 00:12:50 pts/6 182:55 /usr/java5_64/bin/java -Xms6g -Xmx8g -javaagent:/home/bea2/user_projects/csdomain/Introscope/wily/Agent.j ar -Dcom.wily.introscope.agentProfile=/home/bea2/user_projects/csdomain /Introscope/wily/IntroscopeAgent.profile -Dcom.wily.introscope.agent.agentName=AdminServer -da -Dplatform.home=/home/weblogic/bea/weblogic92 -Dwls.home=/home/weblogic/bea/weblogic92/server -Dwli.home=/home/weblogic/bea/weblogic92/integration

H3C 3100简单配置命令

H3C交换机简单配置命令 1、配置主机名 [H3C]systemname H3C 2、配置console口密码 # 进入系统视图。 system-view # 进入AUX用户界面视图。 [H3C] user-interface aux 0 # 设置通过Console口登录交换机的用户进行Password认证。[H3C-ui-aux0] authentication-mode password # 设置用户的认证口令为加密方式,口令为123456。 [H3C-ui-aux0] set authentication password cipher 123456 # 设置从AUX用户界面登录后可以访问的命令级别为2级。[H3C-ui-aux0] user privilege level 2 3、配置Telnet # 进入系统视图。 system-view # 进入VTY0用户界面视图。 [H3C] user-interface vty 0

# 设置通过VTY0口登录交换机的用户进行Password认证。 [H3C-ui-vty0] authentication-mode password # 设置用户的认证口令为密码方式,口令为123456。 [H3C-ui-vty0] set authentication password cipher 123456 # 设置从VTY0用户界面登录后可以访问的命令级别为2级。 [H3C-ui-vty0] user privilege level 2 # 设置VTY0用户界面支持Telnet协议。 [H3C-ui-vty0] protocol inbound telnet 4、配置交换机VLAN 1 管理地址 system-view [H3C] interface vlan-interface 1 [H3C-VLAN-interface1] ip address 192.168.0.129 255.255.255.0 5、配置交换机网关地址 [H3C]ip route-static 0.0.0.0 0.0.0.0 192.168.0.1 6、配置HTTP服务 [H3C] local-user admin #创建http 用户 [H3C-luser-admin] service-type telnet [H3C-luser-admin] authorization-attribute level 3

最常用的Shell命令

Shell命令行操作 Linux shell 简介 Linux shell指的是一种程序,有了它,用户就能通过键盘输入指令来操作计算机了。Shell会执行用户输入的命令,并且在显示器上显示执行结果。这种交互的全过程都是基于文本的,与其他各章介绍的图形化操作不同。这种面向命令行的用户界面被称为CLI(Command Line interface)。在图形化用户界面(GUI)出现之前,人们一直是通过命令行界面来操作计算机的。 现在,基于图形界面的工具越来越多,许多工作都不必使用Shell就可以完成了。然而,专业的Linux用户认为Shell是一个非常有用的工具,学习Linux时一定要学习Shell,至少要掌握一些基础知识和基本的命令 启动shell 在启动Linux桌面系统后,Shell已经在后台运行起来了,但并没有显示出来。如果想让它显示出来, 按如下的组合键就可以: + + 组合键中的F2可以替换为 F3、F 4、F 5、F6。 如果要回到图形界面,则按如下组合键: + + 另外,在图形桌面环境下运行“系统终端”也可以执行Shell命令,与用组合键切换出来的命令行界面

是等效的。“系统终端”启动后是一个命令行操作窗口,可以随时放大缩小,随时关闭,比较方便,推荐使用。启动“系统终端”的方法是: 【开始】→【应用程序】→【附件】→【系统终端】 该软件允许建立多个Shell客户端,它们相互独立,可以通过标签 在彼此之间进行切换。 Shell命令基本规则 一般格式 Shell命令的一般格式如下: 命令名【选项】【参数1】【参数2】... 【选项】是对命令的特别定义,以减号(-)开始,多个选项可以用一个减号(-)连起来,如ls -l -a与 ls -la 相同。 【参数】提供命令运行的信息,或者是命令执行过程中所使用的文件名。 使用分号(可以将两个命令隔开,这样可以实现一行中输入多个命令。命令的执行顺序和输入的顺序 相同。 命令补全 在送入命令的任何时刻,可以按键,当这样做时,系统将试图补全此时已输入的命令。如果已 经输入的字符串不足以唯一地确定它应该使用的命令,系统将发出警告声。再次按键,系统则会给出可用来补全的字符串清单。使用命令补全功能,可以提高使用长命令或操作较长名字的文件或文件夹的都是非常有意义的。

常用办公软件测试题汇编

常用办公软件测试题 一、综合部分 1.对于Office XP应用程序中的“保存”和“另存为”命令,正确的是___。 A.文档首次存盘时,只能使用“保存”命令 B.文档首次存档时,只能使用“另存为”命令 C.首次存盘时,无论使用“保存”或“另存为”命令,都出现“另存为”对话框 D.再次存盘时,无论使用“保存”或“另存为”命令,会出现“另存为”对话框 2.对于Office XP应用程序中的“常用”工具栏上的“新建”命令按钮和“文件”菜单下的“新建”命令项,不正确的是___。 A.都可以建立新文档 B.作用完全相同 C.“新建”命令按钮操作没有“模板”对话框,使用空白模板 D.“文件”后“新建”命令可打开“模板”对话框,可以选择不同的模板 3.不能在“另存为”对话框中修改文档的___。 A.位置B。名称 C.内容D。类型 4.Office XP应用程序中的“文件”菜单底端列出的几个文件名表示___。 A.用于切换的文件B。已打开的文件 C.正在打印的文件D。最近被该Office XP应用程序处理过的文件 5.在文本编辑状态,执行“编辑”到“复制”命令后,___。

A.被选定的内容复制到插入点 B.被选定的内容复制到剪贴板 C.被选定内容的格式复制到剪贴板 D.剪贴板的内容复制到插入点 6.当“编辑”菜单中的“剪切”和“复制”命令呈浅灰色而不能被选择时,表示___。A.选定的内容太长,剪贴板放不了 B.剪贴板里已经有信息了 C.在文档中没有选定任何信息 D.选定的内容三图形对象 7.Office XP应用程序中的工具栏可以___。 A.放在程序窗口的上边或下边 B.放在程序窗口的左边或右边 C.作为一个窗口放在文本编辑区 D.以上都可以 8.可以从___中选择Office XP应用程序中的命令。 A.菜单B。工具栏 C.快捷菜单D。以上都可以 9.Office XP应用程序中使用鼠标进行复制操作应___。 A.直接拖动B。按住键拖动 10.使用“剪贴板”进行移动操作应选择___命令。 A.“剪切” B。“复制”

linux+shell脚本语言基础知识

linux shell脚本语言基础知识 一.shell简介 Linux系统的shell作为操作系统的外壳,为用户提供使用操作系统的界面,更确切的说,shell是用户与Linux操作系统沟通的桥梁。用户既可以输入命令执行,又可以利用Shell脚本编程,完成更加复杂的操作。 shell是一个命令解释器,它从输入设备读取命令,再将其转为计算机可以了解的指令,然后执行它。在linux中,shell又不仅是简单的命令解释器,而且是一个全功能的编程环境。 Linux的Shell种类众多,常见的有:Bourne Shell(/usr/bin/sh或/bin/sh)、Bourne Again Shell(/bin/bash)、C Shell(/usr/bin/csh)、K Shell (/usr/bin/ksh)、Shell for Root(/sbin/sh),等等。不同的Shell语言的语法有所不同,所以不能交换使用。每种Shell都有其特色之处,基本上,掌握其中任何一种就足够了。通常用Bash,也就是Bourne Again Shell进行编程。 二.shell使用 1.建立和运行shell程序 shell脚本程序:按照一定的语法结构把若干linux命令组织在一起,是这些命令按照我们的要求完成一定的功能。它可以进行类似程序的编写,并且不需要编译就能执行。(只需修改其权限) 像编写高级语言的程序一样,编写shell程序需要一个文本编辑器,如VI和VIM,通常使用VIM文本编辑器,支持更便利的插入模式。 首先使用VIM编辑器编辑一个hello.sh文件: #!/bin/bash #hello world example

配置H3C交换机常用命令

H3C交换机常用步骤和命令 1.进入命令行sys 2.给交换机命名: sysname fuwuqi2 3.创建所属vlan: vlan 114 4.描述vlan 114 及分配情况: description fuwuqi2 5.把24个口划分到vlan114中: port e 1/0/1 to e 1/0/24 6.退出: quit 7.进入vlan 114: vlan 114 8.查看千兆口信息: dis int g 9.把25,26两个千兆口加到vlan 114中: port g 1/0/25 to g 1/0/26 10.退出: quit 11.进入vlan114 : int vlan 114 12.查看本接口信息dis this 13.退出quit 14.进入vlan 114虚接口下(可以配置管理地址):interface vlan-interface 114 15.配置管理地址ip address 111.115.76.98 27 16.查看信息dis this 17.退出quit 18.配置默认路由ip route-static 0.0.0.0 0.0.0.0 111.115.76.97(分别是目 的地址子网掩码网关) 19.建立一个登陆交换机的用户名local-user fuwuqi2 20.设置登陆密码password cipher fuwuqi2_2918 21.设置用户管理等级0-3,3是超级管理员authorization-attribute level 3 22.设置用“telnet”方式登陆service-type telnet 23.退出quit 24.打开telnet服务telnet server enable 25.设置0-5共6个用户可同时远程登陆user-interface vty 0 5 26.设置用户登陆方式,scheme是用户名+密码authentication-mode scheme 27.查看当前配置信息dis this 28.查看当前所有配置dis cur 29.保存配置信息save 30.查看交换机上有哪些VLAN dis vlan 31.查看各交换机端口状态及vlan情况: dis brief int 32.将某个端口加入到某个vlan中:sys Vlan 111 Port eth 1/0/1 33.查看当前各端口流量情况: dis int 34.查看交换机上mac地址:dis mac-address 物理地址 35.查看CPU占用:dis cup 36.静态IP与MAC地址绑定(不与端口绑定): sys arp static 192.168.11.204 0005-5d02-f2b3 查询:dis arp 192.168.11.204 取消:undo arp 192.168.11.204

软件测试常用术语表

第119贴【2004-10-12】:常见测试术语一 Acceptance Testing--可接受性测试 一般由用户/客户进行的确认是否可以接受一个产品的验证性测试。 actual outcome--实际结果 被测对象在特定的条件下实际产生的结果。 Ad Hoc Testing--随机测试 测试人员通过随机的尝试系统的功能,试图使系统中断。algorithm--算法 (1)一个定义好的有限规则集,用于在有限步骤内解决一个问题;(2)执行一个特定任务的任何操作序列。 algorithm analysis--算法分析 一个软件的验证确认任务,用于保证选择的算法是正确的、合适的和稳定的,并且满足所有精确性、规模和时间 方面的要求。 Alpha Testing--Alpha测试 由选定的用户进行的产品早期性测试。这个测试一般在可控制的环境下进行的。 analysis--分析 (1)分解到一些原子部分或基本原则,以便确定整体的特性;(2)一个推理的过程,显示一个特定的结果是假 设前提的结果;(3)一个问题的方法研究,并且问题被分解为一些小的相关单元作进一步详细研究。 anomaly--异常 在文档或软件操作中观察到的任何与期望违背的结果。

application software--应用软件 满足特定需要的软件。 architecture--构架 一个系统或组件的组织结构。 ASQ--自动化软件质量(Automated Software Quality) 使用软件工具来提高软件的质量。 assertion--断言 指定一个程序必须已经存在的状态的一个逻辑表达式,或者一组程序变量在程序执行期间的某个点上必须满足的 条件。 assertion checking--断言检查 用户在程序中嵌入的断言的检查。 audit--审计 一个或一组工作产品的独立检查以评价与规格、标准、契约或其它准则的符合程度。 audit trail--审计跟踪 系统审计活动的一个时间记录。 Automated Testing--自动化测试 使用自动化测试工具来进行测试,这类测试一般不需要人干预,通常在GUI、性能等测试中用得较多。 第120贴【2004-10-13】:常见测试术语二 Backus-Naur Form--BNF范式 一种分析语言,用于形式化描述语言的语法 baseline--基线

Shell脚本编写基础

Shell本身是一个用C语言编写的程序,它是用户使用Linux的桥梁。Shell既是一种命令语言,又是一种程序设计语言。作为命令语言,它交互式地解释和执行用户输入的命令;作为程序设计语言,它定义了各种变量和参数,并提供了许多在高级语言中才具有的控制结构,包括循环和分支。它虽然不是Linux系统核心的一部分,但它调用了系统核心的大部分功能来执行程序、建立文件并以并行的方式协调各个程序的运行。因此,对于用户来说,shell 是最重要的实用程序,深入了解和熟练掌握shell的特性极其使用方法,是用好Linux系统的关键。可以说,shell使用的熟练程度反映了用户对Linux使用的熟练程度。 一、什么是shell 当一个用户登录Linux系统之后,系统初始化程序init就为每一个用户运行一个称为shel l(外壳)的程序。那么,shell是什么呢?确切一点说,shell就是一个命令行解释器,它为用户提供了一个向Linux内核发送请求以便运行程序的界面系统级程序,用户可以用shell 来启动、挂起、停止甚至是编写一些程序。 当用户使用Linux时是通过命令来完成所需工作的。一个命令就是用户和shell之间对话的一个基本单位,它是由多个字符组成并以换行结束的字符串。shell解释用户输入的命令,就象DOS里的https://www.doczj.com/doc/2a561975.html,所做的一样,所不同的是,在DOS中,https://www.doczj.com/doc/2a561975.html,只有一个,而在Linux下比较流行的shell有好几个,每个shell都各有千秋。一般的Linux系统都将bash作为默认的shell。 二、几种流行的shell 目前流行的shell有ash、bash、ksh、csh、zsh等,你可以用下面的命令来查看你自己的shell类型: #echo $SHELL $SHELL是一个环境变量,它记录用户所使用的shell类型。你可以用命令: #shell-name 来转换到别的shell,这里shell-name是你想要尝试使用的shell的名称,如ash等。这个命令为用户又启动了一个shell,这个shell在最初登录的那个shell之后,称为下级的shell或子shell。使用命令: $exit 可以退出这个子shell。 使用不同的shell的原因在于它们各自都有自己的特点,下面作一个简单的介绍: 1.ash ash shell是由Kenneth Almquist编写的,Linux中占用系统资源最少的一个小shell,它只包含24个内部命令,因而使用起来很不方便。 2.bash bash是Linux系统默认使用的shell,它由Brian Fox和Chet Ramey共同完成,是Bourne Again Shell的缩写,内部命令一共有40个。Linux使用它作为默认的shell是因为它有诸如以下的特色: (1)可以使用类似DOS下面的doskey的功能,用方向键查阅和快速输入并修改命令。 (2)自动通过查找匹配的方式给出以某字符串开头的命令。 (3)包含了自身的帮助功能,你只要在提示符下面键入help就可以得到相关的帮助。 3.ksh ksh是Korn shell的缩写,由Eric Gisin编写,共有42条内部命令。该shell最大的优点是几乎和商业发行版的ksh完全兼容,这样就可以在不用花钱购买商业版本的情况下尝试商业版本的性能了。 4.csh

H3C交换机常用配置命令

H3C交换机常用配置命令 一、用户配置 system-view [H3C]super password H3C 设置用户分级密码 [H3C]undo super password 删除用户分级密码 [H3C]localuser bigheap 123456 1 Web网管用户设置,1(缺省)为管理级用户,缺省admin,admin [H3C]undo localuser bigheap 删除Web网管用户 [H3C]user-interface aux 0 只支持0 [H3C-Aux]idle-timeout 2 50 设置超时为2分50秒,若为0则表示不超时,默认为5分钟 [H3C-Aux]undo idle-timeout 恢复默认值 [H3C]user-interface vty 0 只支持0和1 [H3C-vty]idle-timeout 2 50 设置超时为2分50秒,若为0则表示不超时,默认为5分钟 [H3C-vty]undo idle-timeout 恢复默认值 [H3C-vty]set authentication password 123456 设置telnet密码,必须设置[H3C-vty]undo set authentication password 取消密码 [H3C]display users 显示用户 [H3C]display user-interface 显示用户界面状态 二、系统IP设置 [H3C]vlan 20 [H3C]management-vlan 20 [H3C]interface vlan-interface 20 创建并进入管理VLAN [H3C]undo interface vlan-interface 20 删除管理VLAN接口 [H3C-Vlan-interface20]ip address 192.168.1.2 255.255.255.0 配置管理VLAN接口静态IP地址(缺省为192.168.0.234) [H3C-Vlan-interface20]undo ip address 删除IP地址

常用通讯测试工具使用

常用通讯测试工具 鉴于很多MCGS用户和技术人员对通讯测试工具并不很熟悉,本文档将针对实际的测试情况,对串口、以太网通讯调试过程中所涉及到的常用的测试软件进行相关的讲解。 1. 串口测试工具: 串口调试工具:用来模拟上下位机收发数据的串口工具,占用串口资源。如:串口调试助手,串口精灵,Comm等。 串口监听工具:用来监听上下位机串口相关操作,并截获收发数据的串口工具。不占用串口资源。如:PortMon,ComSky等。 串口模拟工具:用来模拟物理串口的操作,其模拟生成的串口为成对出现,并可被大多数串口调试和监听软件正常识别,是串口测试的绝好工具。如:Visual Serial Port等。 下面将分别介绍串口调试助手、Comm、PortMon和Visual Serial Port的使用。

1.1. 串口调试助手: 为最常用的串口收发测试工具,其各区域说明及操作过程如下: 串口状态 打开/关闭串口 十六进制/ASCII 切换 串口数据 接收区 串口参数 设置区 串口数据 发送区 串口收发计数区 发送数据功能区 保存数据功能区 操作流程如下: ? 设置串口参数(之前先关闭串口)。 ? 设置接收字符类型(十六进制/ASCII 码) ? 设置保存数据的目录路径。 ? 打开串口。 ? 输入发送数据(类型应与接收相同)。 ? 手动或自动发送数据。 ? 点击“保存显示数据”保存接收数据区数据到文件RecXX.txt。 ? 关闭串口。 注:如果没有相应串口或串口被占用时,软件会弹出“没有发现此串口”的提示。

1.2. PortMon 串口监听工具: 用来监听上下位机串口相关操作,并截获收发数据的串口工具。不占用串口资源, 但在进行监听前,要保证相应串口不被占用,否则无法正常监听数据。 连接状态 菜单栏 工具栏 截获数据显示区 PortMon 设置及使用: 1). 确保要监听的串口未被占用。 如果串口被占用,请关闭相应串口的应用程序。比如:要监视MCGS 软件与串口1设备通讯,应该先关闭MCGS 软件。 说明:PortMon 虽不占用串口资源,但在使用前必须确保要监听的串口未被占用,否则无法进行监视。 2). 运行PortMon,并进行相应设置。 ? 连接设置: 在菜单栏选择“计算机(M)”->“连接本地(L)”。如果连接成功,则连接状态显示为“PortMon 于\\计算机名(本地)”。如下图:

H3C交换机配置命令手册

目录 (2)配置静态路由.............................................................. H3C交换机配置命令手册: 交换机端口链路类型介绍: 1. Access类型的端口只能属于1个VLAN, —般用于连接计算机的端口; 2. Trunk类型的端口可以属于多个VLAN,可以接收和发送多个VLAN的报文,一般用于交换机之间连接的端口; 3. Hybrid类型的端口可以属于多个VLAN,可以接收和发送多个VLAN的报文,可以用于交换机 之间连接,也可以用于连接用户的计算机。 认证方式为Scheme时Telnet登录方式的配置 telnet server enable

# local-user guest service-type telnet level 3 password simple 123456 # Vlan 的创建及描述 # system-view #进入配置选项命令行 [SwitchA] vlan 100 #创建当前VLAN [SwitchA-vlan100] description Dept1 #当前VLAN 的描述 [SwitchA-vlan100] port GigabitEthernet 1 /0/1 #将当前端口加入到对就的VLAN 下面 将端口配置为Trunk 端口,并允许VLAN10 和VLAN20 通过[SwitchA]interface GigabitEthernet 1 /1 #进入当前端口 [SwitchA-GigabitEthernet1 /1]port link-type trunk #将当前端口设为中继 [SwitchA-GigabitEthernet1 /1]port trunk permit vlan all #允许所有VLAN 通过 [SwitchA-vlan100] quit #退出 DHCP典型配制举例: # [SwitchA] dhcp server ip-pool 0 #建立DHCP组 #地址池范围 [SwitchA-dhcp-pool-0] domain-name #WINS 服务器地址 #DNS服务器地址 [SwitchA-dhcp-pool-O] #从DNS 的配制#不参与的地址分配的地址(保留地址)[SwitchA] dhcp server detect # 配置伪服务器检测功能。 [SwitchA-dhcp-pool-0] quit #退出配置服务选项 [SwitchA] dhcp enable #启用 DHCP服务 DHCP 中继代理 #使能DHCP服务。 [SwitchB] dhcp enable #配置DHCP服务器的地址

常用工具软件测试题及答案

一、判断题 1. Realone Player不支持多节目连续播放。(N) 2. 网际快车可以上传和下载文件。(N) 3. 天网防火墙的拦截功能是指数据包无法进入或出去。(Y) 4. SnagIt可以捕获DOS屏幕,RM电影和游戏等画面。(Y) 5. Adobe Acrobat Reader可以解压缩文件。(N) 6. 金山词霸2002支持Windows XP,但不支持office XP系统。(N) 7. 在用Ner-Burning Room刻录CD音乐时,若误将数据文件从本地资源管理器中拖入刻录机虚拟资源管理器中时,该文件将被添加到音乐CD中。(N) 8. Symantec Ghost 可以实现数据修复。(N) 9. Easy Recovery 可以恢复任何被从硬盘上删除的文件。(N) 10. Ctrem软件具有防发呆功能。(Y) 二.选择题(每小题2分,共40分) 1、下列不属于金山词霸所具有的功能的是:(C ) A、屏幕取词 B、词典查词 C、全文翻译 D、用户词典 2、东方快车提供了(C )种语言翻译。 A、1种 B、2种 C、3种 D、4种 3、:Vintual CD 中的Creat按钮的功能为(B ) A、编辑映像文件 B、创建光盘的映像文件 C、映像文件的显示方式 D、将映像文件插入虚拟光驱 4、下列哪一个软件属于光盘刻录软件(A ) A、Nero-Buring Room B:Virtual CD C: DAEMON Tools D:Iparmor 5、下列不属于媒体播放工具的是(D ) A、Winamp B、超级解霸 C、Realone Player D:WinRAR 6、下列媒体播放器可以自由截取单个画面或整段电影的是非曲直(B ) A、Winamp B、超级解霸 C、Realone Player D、音频解霸 7、下列哪一个不是网际快车为已下载的文件设置的缺省创建类别( D) A、软件 B、游戏和mp3 C、驱动程序 D、电影 8、CuteFTP具有网际快车不具备的功能是( A) A、上传文件 B、下载文件 C、断点续传 D、支持多线程下载 9、如果在天网防火墙的ICMP规则中输入( B)则表示任何类型代码都符合本规则。 A、254 B、255 C、256 D、253 10、Norton Antivirus的安全扫描功能包括(D ) ①自动防护②电子邮件扫描③禁止脚本④全面系统扫描 A、①②③ B、①②④ C、①③④ D、①②③④ 11、ACDSee不能对图片进行下列哪种操作(C ) A、浏览和编辑图像 B、图片格式转换 C、抓取图片 D、设置墙纸和幻灯片放映 12、SnagIt捕获的图片可被存为下列哪些格式(D ) ①BMP ②PCX ③TGA ④RSB A、①②③ B、①②④ C、①②③④ D、①② 13、WinRAR不可以解压下列哪些格式的文件( D)

常用shell脚本

如何用脚本实现分割文件 #!/bin/bash if [ $# -ne 2 ]; then echo 'Usage: split file size(in bytes)' exit fi file=$1 size=$2 if [ ! -f $file ]; then echo "$file doesn't exist" exit fi #TODO: test if $size is a valid integer filesize=`/bin/ls -l $file | awk '{print $5}'` echo filesize: $filesize let pieces=$filesize/$size let remain=$filesize-$pieces*$size if [ $remain -gt 0 ]; then let pieces=$pieces+1 fi echo pieces: $pieces i=0 while [ $i -lt $pieces ]; do echo split: $file.$i: dd if=$file of=$file.$i bs=$size count=1 skip=$i let i=$i+1 done echo "#!/bin/bash" >; merge echo "i=0" >;>; merge echo "while [ $i -lt $pieces ];" >;>; merge echo "do" >;>; merge echo " echo merge: $file.$i" >;>; merge echo " if [ ! -f $file.$i ]; then" >;>; merge echo " echo merge: $file.$i missed" >;>; merge

H3C交换机常用配置命令大全

.用户配置: system-view [H3C]super password H3C 设置用户分级密码 [H3C] undo super password 删除用户分级密码 [H3C]localuser bigheap 123456 1 缺省 admin,admin Web 网管用户设置,1 (缺省)为管理级用户 [H3C] undo localuser bigheap 删除Web 网管用户 [H3C]user- in terface aux 0 只支持0 [H3C-Aux]idle-timeout 2 50 设置超时为 2分50秒,若为0则表示不超时,默认为 5分钟 [H3C-Aux]undo idle-timeout 恢复默认值 [H3C]user-i nterface vty 0 只支持0和 [H3C-vty]idle-timeout 2 50 5分钟 设置超时为 2分50秒,若为0则表示不超时,默认为 [H3C-vty]undo idle-timeout 恢复默认值 [H3C-vty]set authe ntication password 123456 设置telnet 密码,必须设置 [H3C-vt y]undo set authe nticati on password 取消密码 [H3C]display users 显示用户 [H3C]display user- in terface 显示用户界面状态 二.系统IP 配置: [H3C]vla n 20 [H3C]ma nageme nt-vlan 20 [H3C]i nterface vlan-in terface 20 创建并进入管理 VLAN [H3C]u ndo i nterface vla n-in terface 20 删除管理VLAN 接口 [H3C-Vla n-in terface20]ip address 192.168.1.2 255.255.255.0 N 接口静态IP 地址(缺省为192.168.0.234) 配置管理VLA [H3C-Vla n-in terface20]u ndo ip address 删除IP 地址 [H3C-Vla n-in terface20]ip gateway 192.168.1.1 指定缺省网关(默认无网关地 [H3C-Vla n-in terface20]u ndo ip gateway [H3C-Vla n-in terface20]shutdow n 关闭接口 [H3C-Vla n-in terface20]u ndo shutdow n 显示管理VLAN 接口 IP 的相关信息 开启 [H3C]display ip [H3C]display in terface vla n-in terface 20 开启IP 调试功能 查看管理VLAN 的接口信息 debugg ing ip undo debuggi ng ip :

常用工具软件测试题及答案

、判断题 1. Realo ne Player不支持多节目连续播放。 (N ) 2. 网际快车可以上传和下载文件。(N ) 3. 天网防火墙的拦截功能是指数据包无法进入或出去。(Y ) 4. Snagit可以捕获DOS屏幕,RM电影和游戏等画面。(Y ) 5. Adobe Acrobat Reader 可以解压缩文件。 (N ) 6.金山词霸2002支持Windows XP,但不支持office XP 系统。 (N ) 7. 在用Ner-Burning Room 刻录CD 音乐时,若误将数据文件从本地资源管理器中拖入刻录机虚拟资源管理器中时,该文件将被添加到音乐CD 中。(N ) 8. Symantec Ghost 可以实现数据修复。 (N ) 9. Easy Recovery 可以恢复任何被从硬盘上删除的文件。(N ) 10. Ctrem 软件具有防发呆功能。 (Y ) 二.选择题(每小题2分,共40 分) 1、下列不属于金山词霸所具有的功能的是:(C ) A、屏幕取词 B、词典查词 C、全文翻译 D、用户词典 2、东方快车提供了(C )种语言翻 译。 1种B、2种C、3种D、4种 3、:Vintual CD 中的Creat 按钮的功能为 (B ) 编辑映像文件B、创建光盘的映像文件 映像文件的显示方式D、将映像文件插入虚拟光驱 4、下列哪一个软件属于光盘刻录软件(A ) A 、Nero-Buring Room B:Virtual CD C: DAEMON Tools D:iparmor 5、下列不属于媒体播放工具的是(D ) A、Winamp B、超级解霸 C、Realone Player D:WinRAR

Shell脚本编程详解-吐血共享

第12章 Shell 脚本编程 ● Shell 命令行的运行 ● 编写、修改权限和执行Shell 程序的步骤 ● 在Shell 程序中使用参数和变量 ● 表达式比较、循环结构语句和条件结构语句 ● 在Shell 程序中使用函数和调用其他Shell 程序 12-1 Shell 命令行书写规则 ◆ Shell 命令行的书写规则 对Shell 命令行基本功能的理解有助于编写更好的Shell 程序,在执行Shell 命令时多个命令可以在一个命令行上运行,但此时要使用分号(;)分隔命令,例如: [root@localhost root]# ls a* -l;free;df 长Shell 命令行可以使用反斜线字符(\)在命令行上扩充,例如: [root@localhost root]# echo “ this is \ >long command ” This is long command 注意: “>”符号是自动产生的,而不是输入的。 12-2 编写/修改权限及执行Shell 程序的步骤 ◆ 编写Shell 程序 ◆ 执行Shell 程序 Shell 程序有很多类似C 语言和其他程序设计语言的特征,但是又没有程序语言那样复杂。Shell 程序是指放在一个文件中的一系列Linux 命令和实用程序。在执行的时候,通过Linux 操作系统一个接一个地解释和执行每条命令。首先,来编写第一个Shell 程序,从中学习Shell 程序的编写、修改权限、执行过程。

12-2-1 编辑Shell程序 编辑一个内容如下的源程序,保存文件名为date,可将其存放在目录/bin下。 [root@localhost bin]#vi date #! /bin/sh echo “Mr.$USER,Today is:” echo &date “+%B%d%A” echo “Wish you a lucky day !” 注意: #! /bin/sh通知采用Bash解释。如果在echo语句中执行Shell命令date,则需要在date 命令前加符号“&”,其中%B%d%A为输入格式控制符。 12-2-2 建立可执行程序 编辑完该文件之后不能立即执行该文件,需给文件设置可执行程序权限。使用如下命令。[root@localhost bin]#chmod +x date 12-2-3 执行Shell程序 执行Shell程序有下面三种方法: 方法一: [root@localhost bin]#./ date Mr.root,Today is: 二月 06 星期二 Wish you a lucky day ! 方法二: 另一种执行date的方法就是把它作为一个参数传递给Shell命令: [root@localhost bin]# Bash date Mr.root,Today is: 二月 06 星期二 Wish you a lucky day ! 方法三: 为了在任何目录都可以编译和执行Shell所编写的程序,即把/bin的这个目录添加到整个环境变量中。 具体操作如下: [root@localhost root]#export PATH=/bin:$PATH [root@localhost bin]# date Mr.root,Today is: 二月 06 星期二 Wish you a lucky day !

相关主题
文本预览
相关文档 最新文档