HP-UX
Jump to navigation
Jump to search
Contents
links
- HPUX reference
- HP-UX faq
- UnixGuide compare various Unixes
tips and notes
shell
- to redirect Standard Error to a file use ...
'2>'
.. instead of usuall
'>'
VI commands
'I' - insert at ther begginig of the line '3,404w file.txt' write lines 3 to 404 to file.txt ':m n' move current line to after line n ':t n' copy current line to after line n
kernel reconfiguration
- 'cd /stand/build'
- /usr/lbin/sysadm/system_prep -s system - creates '/stand/build/system' as configuration file with parameters taken from running system
- kmtune -S /stand/build/system - queries system parameters
- kmtune -S /stand/build/system -s maxusers=30 - sample setting value of a parameter
- kmsystem -S /stand/build/system -q ps2 - queries 'system' for the status of 'ps2' value
- kmsystem -S /stand/build/system -c Y ps2 - changes value of ps2 to Yes
- kmadmin
- mk_kernel -s ./system - builds new kernel using 'system' as configuration file
devices
- major and minor device number
- major device number stands for driver used for device
- minor device number is defined by physical location and device specifics..
- character and block device
- character or raw device
- for serial data transfer
- on 'ls -al' first letter is 'c'
- block devices
- moves blocks to buffer and writes after 'sync' executed by 'syncer' daemon
- on 'ls -al' first letter is 'b'
- character or raw device
- device hardware address
c t d
- mknod syntax
disks / file systems
- 'pvdisplay'
- use block device file as argument
- 'vgdisplay'
- uses volume group device as argument f.e. '/dev/vg00'
- 'lvdisplay'
- uses logical volume block device as argument
- 'mediainit'
- formats disk and confirms integrity. uses raw / character device file!
- 'pvcreate'
- creates physical volume using raw device file
- 'vgcreate' - creating volume group
- 'mknod /dev/vg02/group c 64 0x020000'
- 'vgcreate /dev/vg02 /dev/dsk/c2t5d0'
- 'vgextend'
- 'lvcreate'
- f.e. 'lvcreate -L 500 -n masopust vg02' creates logical volume of size 500mb named 'mosopust' in volume group vg02
- 'vgdisplay'
- 'lvextend'
- 'lvdisplay'
- metadata - superblock, inodes, directory area
- 'fstyp'
- 'newfs'
- 'mount'
- 'fuser' - manages processes / use of filesystem. Useful if you want to unmount filesystem.
- 'bdf'
to test yet
- cut
- tee - sends output of pipe to additional place (file as well as stout f.e.)