免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1451 | 回复: 0
打印 上一主题 下一主题

[新手入门] AIX Useful Commands(zt) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-06-17 21:37 |只看该作者 |倒序浏览
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.


oslevel                       Returns operating system level
     4 . 3 . 3 . 0  (filename or device)
eg find ./usr/ -print | cpio -ocv > /dev/rmt0
CPIO RESTORE
------------
cpio -ict  new.filename                 
Strips out ^M characters from ascii files that have been transferred as binary.
To enter crontrol characters type ctrl v then ctrl ? where ? is whatever
ctrl character you need.
--------------------------------------------------------------------------------
                                DEVICES
--------------------------------------------------------------------------------
lscfg                          lists all installed devices
lscfg -v                       lists all installed devices in detail
lscfg -vl (device name)        lists device details
bootinfo -b                    reports last device the system booted from
bootinfo -k                    reports keyswitch position
                               1=secure, 2=service, 3=normal
bootinfo -r                    reports amount of memory (/ by 1024)
bootinfo -s (disk device)      reports size of disk drive
bootinfo -T                    reports type of machine  
                               ie rspc,rs6ksmp,rspc or chrp
lsattr -El sys0 -a realmem     reports amount of useable memory
mknod (device) c (major no) (minor no)        Creates a /dev/ device file.
mknod /dev/null1 c 2 3
lsdev -C        lists all customised devices ie installed
lsdev -P        lists all pre-defined devices ie supported
lsdev -(C or P) -c (class) -t (type) -s (subtype)
chdev -l (device) -a (attribute)=(new value)         Change a device attribute
chdev -l sys0 -a maxuproc=80
lsattr -EH -l (device) -D         Lists the defaults in the pre-defined db
lsattr -EH -l sys0 -a modelname
rmdev -l (device)           Change device state from available to defined
rmdev -l (device) -d        Delete the device
rmdev -l (device) -SR       S stops device, R unconfigures child devices
lsresource -l (device)  Displays bus resource attributes of a device.
cfgmgr                  Configures devices
cfgmgr -i /dev/cd0      Configure devices and install drivers from /dev/cd0
                        if required
cfgmgr -S               Run in serial, used with a larger number of disks
cfgmgr -l scsi0         Configure devices on adapter scsi0 only
diag                Run hardware diagnostic menu     
smitty diag             Run hardware diagnostic menu
( 7020-40P and 7248-43P machines cannot run diagnostics, use diagnostics
  in the SMS menus instead


diag -d (device)        Run diagnostics against a device.
lsslot            Displays all hot swap slots
lsslot -c pci           Lists all pci hot swap slots
lsslot -c pci -a        Lists all available pci hot swap slots
drslot                          Reconfgiures PCI hot-plug slots
drslot -i -c pci -s U0.1-P1-I3        Display a slot, flashes the LED next to
                                      the slot so that it can be identified.
Power Management (PCI machines)
-------------------------------
pmctrl -a            Displays the Power Management state
rmdev -l pmc0        Unconfigure Power Management
mkdev -l pmc0        Configure Power Management
--------------------------------------------------------------------------------
                                TAPE DRIVES
--------------------------------------------------------------------------------
rmt0.x where x = A + B + C
A = density        0 = high      4 = low
B = retension      0 = no        2 = yes
C = rewind         0 = yes       1 = no
tctl -f (tape device) fsf (No)        Skips forward (No) tape markers
tctl -f (tape device) bsf (No)        Skips back (No) tape markers
tctl -f (tape device) rewind          Rewind the tape
tctl -f (tape device) offline         Eject the tape
tctl -f (tape device) status          Show status of tape drive
chdev -l rmt0 -a block_size=512        changes block size to 512 bytes
                                       (4mm = 1024, 8mm = variable but  
                                        1024 recommended)
dd if=/dev/rmt0 bs=128k count=1 | wc -c
Displays the block size of an unknow tape. Set block size to 0 first.
bootinfo -e             answer of 1 = machine can boot from a tape drive
                        answer of 0 = machine CANNOT boot from tape drive
diag -c -d (tape device)        Hardware reset a tape drive.
diag -c -d rmt0
tapechk (No of files)           Checks Number of files on tape.
(filename)           Output crontab entrys to a file
crontab (filename)                Enter a crontab from a file
crontab -r                        Removes all crontab entrys
crontab -v                        Displays crontab submission time.
/var/adm/cron/cron.allow        File containing users allowed crontab use.
/var/adm/cron/cron.deny         File containing users denied crontab use.
/var/adm/cron/crontab           Directory containing users crontab entries.
/var/adm/cron/log               Cron log file.
at (now + 2 minutes, 13:05, etc) {return}        Schedule a job using at
Command or schell script {return}
{CTRL D}
echo "shutdown -Fr" | at now + 1 minute
at -l                                 
atq                      Lists out jobs scheduled to run via at command
at -r (at job No)
atrm  (at job No)        Removes an at job scheduled to run.
/var/adm/cron/at.allow   File containing users allowed at use.
/var/adm/cron/at.deny    File containing users denied at use.
/var/adm/cron/atjobs     Directory containing users at entries.
--------------------------------------------------------------------------------
                                SECURITY
--------------------------------------------------------------------------------
nulladm /var/adm/wtmp      To recreate/clear down the wtmp file.
groups           Lists out the groups that the user is a member of


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/20140/showart_323268.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP