Sunday, August 28, 2005

Show all non-system accounts

logins -u

Saturday, August 27, 2005

Show processor frequency

prtdiag

Show logins with no password

logins -p

Incremental backup with cpio

find . -newer /backup_marker -print | cpio
*Use either backup.log or previous backup as a marker.

Forward tape to the 4th file set

mt -f /dev/rmt/0n fsf 3
*Uses nonrewind device, so the tape stops at the right place. Skips three end-of-file markers, so stops at the beginning of the fourth.

Copy files preserving ownership and permissions

find . -print | cpio -p /new_location

Do not rewind the tape after use

/dev/rmt/0n
*n stands for nonrewind

Fastest way to rewind a tape

< /dev/rmt/0
*Since it is a standard device, it will be rewound after each access.

Alternative to more

pg
+2 scrolls 2 pages forward
-2 scrolls 2 back

If a system fails to boot because of /etc/system

boot -a
and
specify /dev/null as a system file to set kernel parameters to default

Arguments and environment vars of a process

pargs PID
pargs -e PID

List loaded modules, load new, unload loaded

modinfo
modload
modunload

Watch process state at the kernel level

truss -p PID