一般HPUX的termtype设成VT100+。
Backspacekey设成Ctrl-H
Ctrl-H是backspace
看一下自己的权限
# id
uid=0(root) gid=3(sys) groups=0(root),1(other),2(bin),4(adm),5(daemon),6(mail),7(lp),20(users)
unix专有
# banner test
# mesg y
打开messeage的开关
# echo $SHELL
/sbin/sh
stand存放的是HPUX的内核文件(vmunix)
opt是第三方的
usr是HPUX本身提供的这些工具
unix下直接输入命令名就可以执行文件,不用加./是因为PATH环境变量中有了.
find /home/u1 -perm 644
find . -type f
find / -name core -exec rm -i {} \;
\;是找到一个删一个
find命令找到的对象
+号的话是匹配好以后的话才做
;本身是分隔符,为了表示是find所用的,要转义
-i表示删之前要confirm
ssh -y命令可以直接显示界面
pwconv to move passwords from /etc/passwd to /etc/shadow
pwunconv to move password back to /etc/passwd
passwd -f 强制这个用户第一次登录的时候修改password
/etc/profile
~/.profile
~/.shrc or .lcshrc(optional)
sam在11.3以后就废弃了,取尔代之的是smh(System Management Homepage)
swlist |egrep -i 'oe|diag'查看操作系统的年代
不一定有
machinfo查看机器信息
umask的作用
/etc/default
PA-RISC or Itanium CPU chips
memory modules
System/Local Bus Adapters
PCI I/O expansion buses
Device Adapter
Core I/O cards
You can view devices HP-UX hardware addresses, properties and states via the ioscan command
ioscan -f类似于ls -l
我们想看到更详细的信息
ioscan short listing of all devices
ioscan -f full listing of all devices
ioscan -fk full listing, using cached information
ioscan -fH 0/0/0/1/0 full listing of device at 0/0/0/1/0
ioscan -fC disk full listing of "disk" class devices
# ioscan -fC disk
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
disk 0 0/0/2/0.0.0 sdisk CLAIMED DEVICE HP 36.4GATLAS10K3_36_SCA
disk 1 0/0/2/1.3.0 sdisk CLAIMED DEVICE HP DVD-ROM 305
块设备和字符设备的根本区别在于它们是否可以被随机访问
c0t0d0
C是controller
T是target
D是硬盘disk
lssf
list special file
/
dev
dsk rdsk rmt ttyxpx ttydxpx
block disk raw disk tape drive terminal
device files device files device files device files
LVM Disk Partitioning
三个概念
physical volume group logical volume
多个物理硬盘可以做成一个Volume group
一个Volume group再划分为多个逻辑分区
/dev
|
vg01
|
group vg device file
lvol1 block lv
lvol2 device files
rlvol1 raw lv
rlvol2 device files
CREATE:
mkdir /dev/vg01
mknod /dev/vg01/group c 64 0x010000
vgcreate -s 16 vg01 /dev/dsk/c0t3d0 /dev/dsk/c0t4d0
CHECK:
vgdisplay -v vg01
pvdisplay -v /dev/dsk/c0t3d0
pvdisplay -v /dev/dsk/c0t4d0
Creating Logical Volumes:
CREATE:
lvcreate -L 16 -n myswap vg01
默认16兆
lvcreate -L 16 -n myfs1 vg01
lvcreate -L 16 -n myfs2 vg02
CHECK:
vgdisplay -v vg01
lvdisplay -v /dev/vg01/myswap
Create the new file system
newfs -F vxfs /dev/vg01/rmyfs1
vxfs,一般HPUX都是这种类型的文件系统
Create a mount point directory for the file system
mkdir /myfs1
Mount the new file system
mount /dev/vg01/myfs1 /myfs1
Add the file system to the /etc/fstab file
vi /etc/fstab
Remove LVM
Umount the file system
umount /myfs1
Remove the Logical Volume
lvremove /dev/vg01/myfs1
中间还少了pvremove
Remove the Volume Group
vgremove vg01
Remove the device file directory
rm -r /dev/vg01
有s的话是system硬盘,不要动
# strings /etc/lvmtab
/dev/vg00
/dev/dsk/c2t0d0s2
装机的时候能不能一开始就指定LVM
ioscan -fnC disk显示中
有/dev/rdsk/c2t1d0
/dev/rdsk/c3t2d0
在vgcreate的时候要不要指定rdsk
还是用/dev/dsk/c2t1d0
/dev/dsk/c3t2d0
/dev/vg01
0x010000
/dev/vg02
0x020000
Legacy Parallel SCSI Hardware Addresses
1/0/0/2/0. 1. 0
HBA hardware address Target LUN ID
HBA是光纤卡
1/ 0/ 0/ 2/0
Cell SBA LBA device/function
哪个cell上,system总线
SBA system bus adapter
LBA local bus adapter
lsdev
64 64 lv lvm
看网卡
lanscan
Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI
Path Address In# State NamePPA ID Type Support Mjr#
0/0/3/0 0x00306E4CFB10 0 UP lan0 snap0 1 ETHER Yes 119
0/1/2/0 0x00306E4CEA5F 1 UP lan1 snap1 2 ETHER Yes 119
0/4/1/0 0x00306E4AF871 2 UP lan2 snap2 3 ETHER Yes 119
# netstat -ni
/etc/rc.config.d/netconf
Resource Control
里面修改hostname
HPUX是在
/sbin/init.d
不是在/etc/rc.d/init.d下
/sbin/init.d/hostname start
/sbin/init.d/net start
netstat -rn看路由表的情况
加n的话速度更快,不需要pass
/etc/nsswitch.conf
Hosts: dns nis files
域名解析的顺序
把最低级别的文件集列出来
swlist -l bundle -l product -l fileset
swlist -l depot @ 16.157.128.226
swlist -l bundle -d @ 16.157.128.226:/depot/Application/11.23
sed -n -e '200,201p' -e '202q' bigfile
q表示找到202行就退出
PHKL: kernel 级别的,
CO: general HP-UX command
swlist -l product 'PH*'
阅读(848) | 评论(0) | 转发(0) |