Relevant
commands and their options
-f Generates a full listing of a process
-u Generates a list of processes owned by the specified users
-t Generates a list of processes associated with the specified terminal
-e Displays the entire list of processes
ps command indicates daemons with a ? in the tty field
Page 3-21 crontab format scheduling
Page 4-17
fuser Command used to see if you or someone else in the mount directory is using any files before umounting for repair.
fuser –u /dev/filesytem_device determines if anyone is using any of the files
fsck Manual command to check and repair an unmounted (prefereably) filesystem.
df –kv “disk free” the –k option displays in kilobytes and the –v reports the percent of used blocks as well as the number of used and free blocks.
Disk usage- OpenServer filesystem performance will begin to degrade when filesystem free space drops below 15%
find / -size +n –print finds files with the –size +n (size of the file in 512-K byte blocks)
find / -user username –print finds files used by a specific owner
find / -name core –exec rm {} \; finds and automatically deletes all core files
find / -name core –ok rm {} \; does the same thing only gives you a prompt before deleting the core files (dumped files)
> log_filename (output nothing) clears a
logfile without deleting it and maybe screwing up permissions
Page 5-7
dtype Use this command to determine what type of data floppy disk contains
Page 6-51
cbackup Performs unattended incremental backups
cron Executes scheduled commands
crontab Schedules cron jobs
lpshut stops the print services
disable –r “reason” printername disables printer and gives the “reason” in an lpstat report
lpstat can be used to view jobs in the print queue’s use –u option to list by user (lpstat –u user1,user2
accept allows print requests to a printer or class of printers
cancel Cancels print requests
enable Turns on printer or Class of printers
lp Sends requests to a printer
lpsched Starts the print service
lpusers Sets print queue priorities
reject Prevents print requests to a printer or class of printers
scoadmin gives
access to Print job manager and Printer manager
haltsys Shuts down the system (only for emergencies, not a graceful shutdown)
reboot Shuts the system down and reboots
scoadmin Use System Shutdown manager to control shutdowns
shutdown Shuts system down in an orderly manner
shutdown –g sets number of minutes before the system shutsdown. Use hh:mm if want hours and minutes. If option not set, shutdown begins in one minute.
shutdown -y allows the shutdown to proceed without any further prompts
shutdown –f”mesg” broadcasts the message
to all terminals, warning users to save their work (as if they pay attention
anyway)
Page 2-59 Important system administration commands
hwconfig –h Everything is printed in the long format with headers similar to that at boot time.
sar –r 1 5 System activity report. Used with –r reports unused memory pages and swap area disk blocks.
vmstat –s Reports paging and system statistics. With the –s option, outputs a verbose listing of page and trap activity.
sar –u 1 5 -u reports system processor utilization. The “1 5” or other options tell sar how long to monitor for and will return a report every second.
uname –X Used with the capital X option reports; system name, node name, operating system release number, kernel ID, Processor type, bus type, serial number, number of users licensed for ,OEM number, origin number, and number of CPU’s.
swconfig Query system contents database, lists file status and software modifications
divvy Sysadmin
II page 3-37
Divides an fdisk partition into a
number of separate areas known as “divisions”. A division is identified by a
unique major and minor device number and can be used for filesystem, swap area,
or for isolating bad spots on the device.
fdisk Sysadmin
II page 3-33
Displays information about disk partitions and allows you to physically partition the disk. The hard disk has a maximum of four partitions and only one may be active at a time. It is possible to assign a different operating system to each partition. Once a partition is made active, that OS will boot automatically once the current OS is halted.
tail –100 /usr/adm/messages gives you the last 100 lines of the administrative messages log
df –v df is the disk free command. Reports the number of free blocks and inodes available for online filesystems. –v reports the percent of used blocks as well as the numbers of used and free blocks.
cat /etc/default/filesys give the default filesystem configuration
l –Wv gives you a file and directory list that shows the location of actual files that symlinks may point to.
fstyp give you information on what type of filesytem is being used ie; fstyp /dev/boot would tell you what type of filesytem your boot filesys is.
Sysadmin II Vol1 page 3-41
badtrk
cron
divvy
dkinit
fdisk
fstyp
l
mount
exec ksh –o vi
puts bourne or bash into vi mode
cpd The copy protection daemon page 6-41
pmd The
policy manager deamon page 6-41
bootos Stand alone program that can be called from boot. It loads and runs an operating system from a root disk partition other than the current active partition.
bootos ? Gives a list of bootable partitions at
the UNIX boot: prompt.
init (0,1,2,3&4,5&6,s&S) Runlevels of init page 7-39
who –r determines current runlevel
lpstat –t outputs the status of the print scheduler
Change directory to /usr/spool/lp/logs and use: >
requests ; > lpsched This outputs “nothing” to the log files and
clears them without possibly screwing up permissions.
/usr/lib/lpshut stops UNIX print services
/usr/lib/lpsched
Starts UNIX print services
man scsitape Manual pages for adding SCSI tape drives
timex time a command; report process data and system activity
/tcb/bin/secdefs –v gives the security profile
for the system
fixmog Makes all or specific system files consistant with the file control database
integrity Examines system files against the authentication database
asroot Runs a command as root
tcbck Checks the trusted computing base for missing files
relax Changes the system default security
profile
clear Clears the terminal screen
date gives the current date
banner Banners text in a large format
cal Displays a calender
echo [text] Displays the text you type
finger Displays information on users
who Displays the users who are currently on the system
whodo same as who only better
uname Displays information about the operating system
man command Gives you back information on the OS command of your choice
man –k keyword Locates command by keyword (better than apropos)
cat Displays entire file to the screen
more Displays a text file one page at a time
pg Displays a text file one page at a time
head Displays the first ten lines of a file
tail Displays the last ten lines of a file
hd Used to view data files in the hexadecimal format
od Used to view data files in the hexadecimal format
mkdir Used to make a directory
cp copies a file leaving the original untouched
copy Makes a copy of a directory and all the files in it
ln [sourcefile] [destinationfile] creates a link to a file
ln –s [sourcefile] [destinationfile] creates a symbolic link to a file
grep used for finding words or phrases within
a text file
diff compares two text files and displays the differences between them.
cmp compares any two ordinary files whether they contain text or data
sum Can be used to validate that two files are identical by generating a checksum value that is unique to the contents of that file.
touch Creates an empty file or updates modification times of an existing file
wc Counts the number of lines, words, and characters into a file
tr Command for translating specific characters within a text file. It has no filename command line arguments; its input always comes from stdin and it’s output always goes to stout
pr command formats text files to include page numbers, page headers (which include the files modification date and time) and numerous other features as specified by the command line options.