分享
 
 
 

AIX Useful Commands

王朝other·作者佚名  2006-11-23
窄屏简体版  字體: |||超大  

compress -c file.txt > file.Z Create a compressed file.

uuencode (infile) (extract-file-name) > (output file)

Converts a binary file to an ASCII file for transfer by modem or email

uudecode (encoded file)

Extracts a binary file from encoded file and calls it the extract-file-name

examples :-

uuencode maymap maymap > maymap.enc

uudecode maymap.enc

od -c /tmp Displays contents of the /tmp directory file

ls -i Lists files with their inode numbers

echo * Lists files, can be used if ls is corrupt/missing

chtz (timezone eg GMT0BST) Changes the timezone in /etc/environment file

chlang (language eg En_GB) Changes the language in /etc/environment file

ar -v -t (archive file) List contents of an archive

ar -v -x (archive file) Extracts the archive

ar -v -t /usr/lib/libC-r.a Lists contents of the libC_r.a library

find /source -print | cpio -pdm /target

Copying directories using cpio, creates /target/source directory.

dump -nTv (binary executable) Displays the contents of an executable file

dump -c Displays string information

dump -o Displays object file headers

dump -l Displays line numbers

dump -s Displays the text section

snap -ao /dev/rmt0 Create a snapshot onto tape

snap -ad (directory) Create a snapshot into a named directory other

than the default (/tmp/ibmsupt)

/usr/dt/bin/dtconfig -d Disables desktop logins

/usr/dt/bin/dtconfig -e Enables desktop logins

/var/dt/Xpid PID of the dtlogin process

--------------------------------------------------------------------------------

LICENSES / SOFTWARE INSTALLATION

--------------------------------------------------------------------------------

lslicense Displays number of current user licenses

chlicense -u (number) Changes the number of user licenses

( ftp,rexec and rsh (without -i flag) do not need an AIX user license to be

able to access the system.

.net/OS/aix/index2/model3_icon_wink.gif"

oslevel Returns operating system level

4 . 3 . 3 . 0 <--------- Preventive Maintenance Level

| | |

| | +----------------Modification

| +--------------------Release

+------------------------Version

oslevel -l 4.3.3.0 Displays all filesets that are "downlevel"

whence (program) Returns full path of program

whereis (program) Returms full path of program

what (program) Displays identifying info from the executable

like version number, when compiled.

lslpp -L all list all installed software

lslpp -L (program set name) Check if software installed

lslpp -f Lists filesets vs packages

lslpp -ha Lists installation history of filesets

lslpp -w /usr/bin/swapon Lists the fileset that the file belongs to

lppchk -c Checks file checksums against SWVPD

lppchk -l Checks symbolic links against SWVPD

instfix -ik (fix number eg IX66617) Checks id fix is installed

instfix -ik 4330-02_AIX_ML

instfix -i | grep ML Displays all ML's installed

instfix -k IX38794 -d /dev/cd0 Installs a fix from cdrom

/usr/sbin/install_assist Smitty Installation Assistant

/usr/sys/inst.images/sys.bundles Software bundle files

alt_disk_install -c hdisk1 Clones a running rootvg onto hdisk1

alt_disk_install -w Wakes up alt vg

alt_disk_install -s Sends alt vg to sleep !

alt_disk_install -x Removes alt vg from disk

/usr/lpp/bosinst/blvset -d /dev/hdisk0 -p 4.2

Resets the pad string in the BLV to the correct AIX version. Needed if the

migration option is missing when installing.

installp -ad (device) (fileset) (level) Install apply and commit fileset

installp -pad (device) (fileset) (level) Preview install

installp -u (fileset) Remove fileset

installp -ld (device) List all software on device

example:-

installp -pad /dev/rmt0 X11.base 4.3.3.0

installp -C Cleans up after a premature cancel or interrupted installation.

--------------------------------------------------------------------------------

TERMINALS / DISPLAYS

--------------------------------------------------------------------------------

/usr/share/lib/terminfo Directory with all support terminal info files.

tty Displays what the tty/pty number of the terminal is.

termdef reports the termtype setup in smit for the tty port

that termdef is run on.

chdev -l (device eg tty1) -a term=vt100 Sets tty to a vt100 terminal type

penable tty0 adds getty line into /etc/inittab for tty0 and starts getty

pdisable tty0 disables the getty line and disables getty

penable / pdisable -a option is for all

stty erase ^? Set backspace key for vt100 terminals

stty erase ^H Set backspace key for wyse50 terminals

lscons Displays the console device

chcons -a login=enable (device eg /dev/tty1) Changes the console device

lsdisp Display adapter device information

chdisp Change default display used by LFT subsystem

Create ttys on ports 0 to 7 on adapter sa2 :-

for i in 0 1 2 3 4 5 6 7

do

mkdev -c tty1 -t tty -s rs232 -p sa2 -w$i -a login=enable -a term=vt100

done

portmir -t /dev/tty0 Mirror current terminal onto /dev/tty0

portmir -o Turns off port mirroring

--------------------------------------------------------------------------------

NETWORK

--------------------------------------------------------------------------------

host (ip or hostname) Resolves a hostname / ip address

hostname Displays hostname

hostname (hostname) Sets the hostname until next reboot

lsdev -Cc if Lists all available/defined network interfaces

chdev -l (device name) -a hostname=(hostname) Changes hostname permanently

chdev -l inet0 -a hostname=thomas

ifconfig (device name) Displays network card settings

ifconfig (device name) up Turns on network card

chdev -l (device name) -a state=up Turns on network card

ifconfig (device name) down Turns off network card

ifconfig (device name) detach Removes the network card from the

network interface list

ifconfig en0 inet 194.35.52.1 netmask 255.255.255.0 up

ifconfig lo0 alias 195.60.60.1 Create alias ip address for loopback

route (add/delete) (-net/-host) (destination) (gateway)

Adds or deletes routes to other networks or hosts, does not update

the ODM database and will be lost at reboot.

route add -net 194.60.89.0 194.60.90.4

chdev -l inet0 -a "net,-hopcount,1,-netmask,255.255.255.0,207.156.168.0,10.0.15.254"

(destination) ( gateway

.net/OS/aix/index2/model3_icon_wink.gif"

Adds route and adds entry into ODM, route survives a reboot,

route -rn Display route table

odmget -q "attribute=route" CuAt Displays routes in the ODM.

lsattr -EHl inet0 Displays routes set in ODM and hostname

odmget -q "name=inet0" CuAt Displays routes set in ODM and hostname

refresh -s inetd Refresh inetd after changes to inetd.conf

kill -1 (inetd PID) Refresh inetd after changes to inted.conf

netstat -i Displays interface statistics

entstat -d (ethernet adapter eg en0) Displays ethernet statistics

arp -a Displays ip to mac address table from arp cache

no -a Displays network options use -o to set individual options or

-d to set individual options to default.

no -o option=value (this value is reset at reboot)

no -o "ipfor

[1] [2] [3] [4] 下一页

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有