UNIX Commands Quick List

Commands
mkdir gif = make directory named "gif"
rmdir gif = remove directory named "gif"
rm test = remove file named "test"
mv old new = move file named "old" and rename to "new"
mv old /usr/docs/new = move file named "old" to different dir and rename to "new"

cd = go to current users home directory
cd .. = back out one dir
cd / = go to root dir

ls = list files
ls d* = list files starting with "d"
ls -a = list files including "." files
ls -l = list files & permissions
ls -al = list files including "." files plus persmissions
ls |more = list files page at a time
ls -al >>test = redirect screen output into file named "test"

ps = display current directory processes
ps -e = display all running processes
ps -f = display current directory processes (.exe's) plus details
ps -ef | grep chuck = display all "chuck" processes (pid#) plus details
ps -ef | grep send = display all "send" processes plus details
kill -9 pid#
sync; sync; init 6 = sync files and reboot

"command" !$ = ?
df = disk partition space
df -k = disk partition free space - show size details
dmesg = display OS ver, memory total/avail, CPU(speed/quanity) etc.
echo $PATH = display users path
finger = display all users logged on
finger "chuck" = ?
ftp "ftp.skunk.net " =
halt = (must be root)
host "ftp.skunk.net " = display IP address of "ftp.skunk.net"
ifconfig -a = display TCP/IP info
iostat -cx 5 =
jobs = display stopped jobs
mail -v or mailx -v or sendmail -v "chuck@skunk.net" =
more "cshrc" =
netstat = display TCP info ???
netstat -an|grep syn = ??
netstat -r = show routing table
ping 192.231.42.1 = ping IP address 192.231.42.1 (usually one to five pings)
ping -s 192.231.42.1 = ping IP address 192.231.42.1 nonstop
source ".cshrc" =
telnet "host name/server" or telnet "IP Address" =
top = display top 15 processes
uname -a = display OS info i.e. version etc.
vmstat 1 = display system hardware/software details i.e. memory paging to disk
which "text" = ?
where "text" = ?
w = detailed list of who's logged in and what they have open plus CPU load average
who = List users and what they have open
whodo "chuck" or whodo "ginger" = display ?
whois "shunk.net" =

cat foo = display contents of file named "foo"
cat foo test > foodoo = append contents of file "test" to end of file "foo" & create new file named "foodoo"
chat ??? = ???
date = display time date
man ping = show manual pages for ping command
pwd = display current path
talk dannyb = ???
touch test = create dir named test

Crontabs

crontab -l = to view my own
crontab -? = to view another users crontabs - must be superuser

Environment files

. login = path
. cshrc = default to tcsh
. history = screen buffer history
. signature = email signature

User password & user add tool

useradd -d /home/john -s /bin/csh -c "John Smith" -m doug
passwd chuckw - to change user account password, must be root first

Directories

DNS
cd /usr/local/named - named.boot
cd /usr/local/named/db - db.domain.com - template/24
cd /usr/local/named/rev - db.x.x.x - rev.template/24
cd /usr/local/named/sec - db.domain.com - db.x.x.x
/usr/local/doc/script/tftput and dnsmunger

named.boot error log
tail -f /var/adm/messages - real time log of all errors
tail -f /var/adm/messages |grep 192.231.42.1
grep 192.231.42.1 /var/adm/messages ("|more" optional)

semdmail
/etc/rc2.d/S88sendmail - restarts sendmail durring reboot - sh script commands


Suggestions... Send to: charly@skunk.net