sundot home page unix consulting in the uk. real life unix observations and tips.
·home
·about sundot
·unix
·downloads
·archives›date
·archives›subject
·external links
sundot/ unix/ handy commands

Some handy Solaris commands - just a reference to useful options and commands.

set path to something like
PATH=/usr/bin:/usr/ccs/bin:/usr/sbin:/sbin:/usr/platform/`uname -i`/sbin:/usr/proc/bin:/usr/ucb/:/usr/dt/bin:/usr/openwin/bin:/usr/local/bin:$HOME/bin

df -n (or fstyp device) show type of file system (ufs/vxfs)
fuser and pfiles open files
prtconf -V OBP level
pgrep, pkill, prstat -a process info and manipulation
logins -p|-d local users without passwords | duplicate uids
mpstat, prtdiag, psrinfo -v processor information and more
traceroute since Solaris 7
troff -man man.1 | dpost | lp print old style man pages
sgml2roff lpfilter.1m | troff -man | dpost | lp print sgml (new) man pages
fstyp -v list superblock including minfree %
tput nice screen output
what, ldd, strings information about binaries
ctrl-V in vi insert control character
ftp> get README | more
ufsdump 0f - /filesystem | (cd /mnt; ufsrestore rf -); rm /mnt/restoresymtable dump restore pipe
echo \007 get bell to ring
comm common (non-common) lines from two files
pkgchk -lp /usr/bin/ls which package does ls belong to?
df -oi -F ufs free inodes
icheck -b blockno filesystem block to file mapping
dircmp, rsync, filesync compare directories, sync utilities
nohup /var/tmp/myscript.ksh > /var/tmp/myscript.out & for things which have to complete (no risk of terminal being logged out)
netstat -pn arp like output when name services are down
pwdx, pldd, ptree and more in /usr/proc/bin
uname -X basic system information - one item on each line (useful for scripts)
read read a line
listusers another way of listing users
tcopy copy tape
nfsstat -m (or check /etc/rmtab) current nfs mount
clear_locks clear nfs locks
df -h, du -h, ls -lh since Solaris 9 - output in powers of 1024
odin#rpcinfo -u localhost mountd
program 100005 version 1 ready and waiting
program 100005 version 2 ready and waiting
program 100005 version 3 ready and waiting
odin# rpcinfo -u localhost nfs
program 100003 version 2 ready and waiting
program 100003 version 3 ready and waiting
odin#
updated: 20030206 created: 20021218
Creative Commons License Valid HTML 4.01! Valid CSS! Powered by Blosxom!
All content on this website is governed by a Creative Commons license.