HP-UX - Cramsession

General:
Execute permission on a directory controls who can cd into that dir.

File Location & Layout:
/usr Sharable os commands, libs and docs.
/sbin Min commands needed to boot sys.
/opt applications
/etc System configuration files
/dev Device files.
/mnt Local mounts
/tmp OS temp files.
/stand Kernel and boot loader
/bin location of executable unix user
commands.
/var spooling dirs

Memory:
dmesg Boot info & Memory.
swapinfo [-t] Total swap space and usage.

File:
ln -s <original file> <link file>
umount <mount point>
mount [-F <file system>] <dev file> <mount point>
fsck [-F <file system>] <char dev file>
On JFS once increasing the size of the lv, the file system can be
mounted.

Backup:
/usr/sbin/fbackup -f <device> [-0-9] [-u] [[-i <path>]
[-e <path>] [-g<graph>] [-I <path>]
-0-9 backup level
-u update /var/adm/fbackupfiles/dates file
(only if used with -g)
- i include path
- e exclude path
- g file that contains a list of files and
dirs to be include or excluded.
- I write and index to file path

/usr/sbin/frecover -r | -x [-g <graph>] [-i <path>]
[-e <path>] [-f <device>]
/usr/sbin/frecover -I <path> | -R <path> [-f <device>]
-r recover everything
-x extract certain files
-I Read index file and write to path.
Retrieves a table of contents.
-R Restart an interrupted recovery.

LVM:
pvcreate -f /dev/rdsk/c0t5d0 Initialize a disk for use with LVM

create the directory structure needed for a new volume group.
cd /dev
mkdir vg01
cd vg01
mknod group c 64 0x010000

vgcreate vg01 /dev/dsk/c0t5d0 Created a volume group

vgdisplay -v vg01 Display a volume group.

pvcreate -f /dev/rdsk/c0t4d0 Add a disk to a volume group
vgextend vg01 /dev/dsk/c0t4

vgreduce vg01 /dev/dsk/c0t4d0 Remove a disk from a volume group

lvcreate -L 100 -n cad1 vg01 Create a 100 MB logical volume
named cad1
lvcreate /dev/vg00 Will create a lv with a zero size

lvextend -L 120 /dev/vg01/lvol1 Extend the logical volume
lvol1 to 120 MB

extendfs /dev/vg01/rlvol1 Extend the filesystem

Network Administration:
Class Prefix bits Net range
A 0 1 - 126
B 10 128.0 - 191.255
C 110 192.0.0 - 233.255.255
D (Multicast) 1110 224.0.0.0 - 239.255.255.255
E (Reserved) 11110 240.0.0.0 - 247.255.255.255

netstat -rn used to display routing tables

DNS:
/etc/resolv.conf Lists location of name servers.
/etc/nsswitch.conf Used to specify what name service to
resolve information from.

NIS/NFS: (Read Page 608 - 620 Essential Sys Adin)
/etc/fstab Remote filesystems are entered in here.
/etc/exports which filesystems on the local system are
exported

LAN:
lanscan Displays address for lan cards.
netstat -in Display IP address and status for LAN
cards.
ifconfig <LAN> Display flags, subnet masks, and IP
address for specified LAN.

Customizing the System and User Environments:
Customizing System Startup /sbin/rc
Customizing the Login /etc/issue
Posting a Message of the Day /etc/motd
- /etc/profile or /etc/csh.login should have the line cat /etc/motd

Customizing System-Wide and User Login Environments
/etc/profile for Korn and POSIX users, /etc/csh.loing for C shell users

Special thanks to Leo Kenner for contributing this Cramsession