Here are some reference guides for a few UNIX commands
For useless information they are taken from the man pages.
To fix errors, or bother me click here to e-mail me
NEW DOS COMMANDS
check out our new DOS command reference.
MS/DOS commands and Windows Commands
UNIX COMMANDS
For information on LINUX stuff - which is pretty much the same as UNIX
check out this place
www.linuxdoc.org
useless information
commands to modify and create user accounts - usually run by superuser root
these UNIX commands are normally used by the super user account ROOT
to create new UNIX userids,
delete existing UNIX userids,
and change existing UNIX userids.
they also allow the UNIX super user
to mess with group id's.
for most of the stuff in the commands
you will need the powers of being a root superuser.
Sometimes these commands are not in your default path and
you will have to execute them by going to the directory the
are stored in which is usually
/usr/sbin
unix commands to move data to and from ms/dos floppy disks
these commands allow you to read your ms/dos floppy disks from UNIX,
and copy your UNIX data to floppy disks that can be read by
MS/DOS, and WINDOWS.
They are often called the mcommands.
Vinie doesnt know jack shit about the mcommands,
but iggi thought they were pretty cool.
They usually come in a a package called MTOOLS or MCOMMANDS.
All this documentation came from a SUN box.
And of course they are usually free.
They run on everything from those LINUX boxes, to those over priced SUN boxes,
HP, AIX, and all the other standard flavors of UNIX.1
And their not limited to floppy disks. One site I worked at had MTOOLS
set up so you could treat your files on the IBM MAINFRAME running MVS as
UNIX files. Such as:
mcat /sys1.linklib
- mtools -
mattrib change attributes of files on ms/dos floppy disks - like unix chmod command or ms/dos attrib command
-
- mtools -
mbadblocks
- finds bad blocks on a ms/dos floppy disk and marks them as bad
- mtools - mcat - list, print, or dump the contents of file on ms/dos floppy disk. sometimes mtype is used instead. mcat a:msdos.file
- mtools -
mcd
- cd to a directory on a ms/dos floppy disk
- mtools -
mcopy
- copy a unix file to a ms/dos floppy disk, or , copy a file on a ms/dos floppy disk to unix. mcopy unixfile a:dos_disk.fil
for example:
mcopy a:autoexec.bat unix_autoexec_script
or
mcopy unix_script a:dosscript.bat
- mtools -
mdel
- delete files on ms/dos floppy disk
- mtools -
mdeltree
-
- mtools -
mdir
- list files on a ms/dos floppy disk. like dos dir command, and unix ls command, but for ms/floppy disks on a unix machine.
for example:
$ mdir a:
Volume in drive A has no label
Directory for A:/
addsub 46 01-02-2001 9:23 addsub
autoexec bat 610 01-02-2001 9:23 autoexec.bat
backup 635 01-02-2001 9:23 backup
dumpfile 5889 01-02-2001 9:23 dumpfile
hours 395 01-02-2001 9:23 hours
INDEX~1 HTM 30626 01-02-2001 9:23 index.html
krud 448 01-02-2001 9:23 krud
krud pl 84 01-02-2001 9:23 krud.pl
krud2 786 01-02-2001 9:23 krud2
mi 25 01-02-2001 9:23 mi
notes 37797 01-02-2001 9:23 notes
notes cis 214 01-02-2001 9:23 notes.cis
quit txt 1307 01-02-2001 9:23 quit.txt
16 files 90 454 bytes
1 362 432 bytes free
$
- mtools -
mdu - list blocks used by a ms/dos directory or file.
It looks like it lists SECTORS use not BYTES used.
mdir lists the number 2486 for file size while
mdu lists the number 5 for file size
Which in this case implies that a block is 512 bytes.
$ mdir a:man-mtype.html
MAN-MT~3 HTM 2486 01-02-2001 8:59 man-mtype.html
$ mdu a:man-mtype.html
A:/man-mtype.html 5
- mtools -
mformat format a ms/dos floppy disk on a UNIX machine
-
- mtools -
mkmanifest
-
- mtools -
mlabel Writes a label to a ms/dos floppy disk file
-
- mtools -
mmd
- msdos or unix mkdir command to create a directory on a ms/dos floppy disk, make a directory on a ms/dos floppy disk
- mtools -
mmount
-
- mtools -
mmove more or rename a md/dos file (see mmove, mren )
-
- mtools -
mrd
- ms/dos rmdir command is mrd in mtools. remove a directory on a ms/dos floppy disk.
- mtools -
mread
-
- mtools -
mren
- more or rename a md/dos file (see mmove, mren )
- mtools -
mtoolstest
-
- mtools -
mtype
- list, print, or dump the contents of file on ms/dos floppy disk. sometimes mcat is used instead.
- mtools - the
a:
and
b:
commands for unix
standard unix commands
these are the UNIX commands used by most normal users.
maybe thats a oxymoron.
at - create a job to run at a later date/time
atrm - kill a job that will start at a future time
atq - list jobs scheduled to be started in future
awk - a high level programming language that looks like C
see nawk
see gawk
see perl - which combines sed and awk in a superset of both languages
note:modern versions of UNIX combine awk, nawk, gawk and place the program in awk
BASH shell - bash
see sh - bourne shell
see ksh - korn shell
see csh - C shell
along with the KORN shell the BASH shell is probably the most powerfull shell
bc - a caculator
bourne shell - sh
see bash - BASH shell - Bourne again Shell
see ksh - korn shell
see csh - C shell
C shell - csh
see bash - BASH shell - Bourne again Shell
see ksh - korn shell
see sh - Bourne Shell
C programmers often like this shell - because it you can program it like C
but after using the C Shell and the KORN Shell I think the
KORN Shell is much more powerfull then the C Shell
cal - prints a calander for any year or month
watch out for September 1752 - its an odd year for countries that were ruled by England
$cal 9 1752
September 1752
S M Tu W Th F S
1 2 14 15 16 - where did 3 thru 13 go in Sept 1752
17 18 19 20 21 22 23
24 25 26 27 28 29 30
$
cc - C compiler
cpio - copy files to tape
see tar
cpp - C compiler pre-processor
cron - schedule a job to run in the future
see at command
see crontab
crontab - schedule job in the future
see at command
see cron
cut
date - returns date and time 100's of formats
dd - convert EBCDIC to ASCII and vise versa
diff - compares 2 files and shows differences
IBM'ers will be sick when they see that
diff does not die after finding 10 differences like IEBCOMPR
even if the files have hundreds of differences
diff will tell you what they are
ed - a line editor replaced by ex, vi and sed
egrep - a more powerfull version of grep
see grep - a program used to search for text in files
emacs - the newest full screen editor
see vi & ex for the old editors - also see vim - a fancy freeware version of vi
eval - used to build commands from variables
inputfile="mikes_file"
outfile=">the_out_file"
eval sort $inputfile $outfile
1) eval scan it once giving
sort mikes_file >the_outfile
2) eval executes the command
sort mikes_file >the_outfile
ex - a line editor that is part of vi
see vi - which stands for VIsual editor
see vim - a fancy freeware version of vi
you can switch between vi and ex by
issuing the Q command in vi to switch to ex
or by
issuing the :vi command in ex to switch to vi
expr - do math or logic on an expression
very usefull in writting scripts where math is required
to get the result go
a=10
b=100
x=`expr $a + $b`
echo "$a + $b = $x"
fake e-mail - the ends and outs on sending fake e-mail
false
a program that always returns false when run
usefull in script testing
see true
fgrep - fgrep sucks use grep or egrep
fgrep stands for Fast GREP and as any UNIX geek will tell you it ain't fast
file - tells you about the contents of a file
tell if a file contains C code, executable code, text, ......
find - find all files that match and do something to them
often xargs is used with find command
and you can search thru several levels of directorys
find . -name '*frog*' -print
finger - find information on computer users
fmt - simple formatting tool
IBM users think of a simple script or DCF program
UNIX users think of simple nroff
UNIVAC users think of a simple @DOC program
ftp - transfer files with a remote computers
gawk - a newer version of awk
see awk
grep - grep search for text and prints it
grep was named after the ex and vi g command
g/RE/p
which means print all the lines which contain the regular expression RE
groff - used to implement nroff
see nroff
see troff
groupadd - add a UNIX groupid
groupdel - delete a UNIX groupid
groupmod - modify a UNIX groupid
gunzip - a UNIX version of PKUNZIP - Uncompress a file using Lempel-Ziv coding
see gunzip, gzip, unzip, zip, pkzip, pkunzip, gzcat, zcat, tar, unzip, zipinfo
gzip - a UNIX version of PKZIP - Compress a file using Lempel-Ziv coding
see gunzip, gzip, unzip, zip, pkzip, pkunzip, gzcat, zcat, tar, unzip, zipinfo
head - display 1st few lines in a file
hexdump
list a file in hex, octal, ..... - replaces od
see od
if - if statements in a script or even at terminal
ipcrm - remove a semaphore, shared memory, or message queue
see ipcs
ipcs - create a semaphore, shared memory, or message queue
see ipcrm
kill - kill a process
korn shell - ksh
see sh - bourne shell
see bash - BASH shell
see csh - C shell
the webmaster says this is the most powerful shell along with the BASH shell which is a freeware version of the KORN Shell - and yes the webmaster has programmed in the C Shell
last
ld - UNIX linker
lex - LEXical analysis program
see yacc
lp
print files or control printers - varies between BSD & SVR4
lpc
print files or control printers - varies between BSD & SVR4
lpd
print files or control printers - varies between BSD & SVR4
lpq
print files or control printers - varies between BSD & SVR4
lpr
print files or control printers - varies between BSD & SVR4
lprm
print files or control printers - varies between BSD & SVR4
ls - list files. UNIX version of dos DIR command
lynx - a text based web browser - ie: not pictures, just text
if your a cheep bastard like me many free e-mail services allow you
to use lynx to browse the web in character mode.
MCOMMANDS and MTOOLS
mostly for copying files to and from ms/dos floppy disks from unix computers.
- mattrib change attributes of files on ms/dos floppy disks - like unix chmod command or ms/dos attrib command
- mbadblocks
- finds bad blocks on a ms/dos floppy disk and marks them as bad
- mcat - list, print, or dump the contents of file on ms/dos floppy disk. same as mtype for all i can figure
- mcd
- cd to a directory on a ms/dos floppy disk
- mcopy
- copy a unix file to a ms/dos floppy disk, or , copy a file on a ms/dos floppy disk to unix. mcopy unixfile a:dos_disk.fil
- mdel
- delete files on ms/dos floppy disk
- mdeltree
-
- mdir
- list files on a ms/dos floppy disk. like dos dir command, and unix ls command, but for ms/floppy disks on a unix machine.
- mdu
- list blocks used by a ms/dos directory or file.
It looks like it lists SECTORS or BLOCKS used not BYTES used.
- mformat format a ms/dos floppy disk on a UNIX machine
-
- mkmanifest
-
- mlabel Writes a label to a ms/dos floppy disk file
-
- mmd
- msdos or unix mkdir command to create a directory on a ms/dos floppy disk, make a directory on a ms/dos floppy disk
- mmount
- mmove more or rename a md/dos file (see mmove, mren )
- mrd
- ms/dos rmdir command is mrd in mtools. remove a directory on a ms/dos floppy disk.
- mread
- mren
- more or rename a md/dos file (see mmove, mren )
- mtoolstest
- mtype
- list, print, or dump the contents of file on ms/dos floppy disk. same as mcat for all i can figure
make - makefile
used to compile and link based on date of changes in source and object code
mail - send and receive e-mail
mail is very usefull way to send mail in UNIX scripts
see mailx - a better mail program
see sendmail - the most powerfull program to send mail also the most confusing
see pine - an even better better mail program
see netscape - a real mail program as opposed to pine, mail, and mailx
see fake e-mail unix allows you to send fake e-mail
mailx - a e-mail program
mailx is very usefull way to send mail in UNIX scripts
see mailx - a better mail program
see pine - an even better better mail program
see netscape - a real mail program as opposed to pine, mail, and mailx
see sendmail - the most powerfull program to send mail also the most confusing
see fake e-mail unix allows you to send fake e-mail
mime - information on mime format data
mmencode - convert to and from mime text
nawk - a newer version of awk
nm - list the names in an object module library
nohup cmd & - run the command even after you logoff
another way of running a batch job
see at
see cron
nroff - format output for printers
implemented thru groff
see troff
od - list files in octal and hex
replaced by hexdump
paste
pine - a full screen e-mail program
mail and mailx are probably more usefull in scripts to send mail
see fake e-mail unix allows you to send fake e-mail
perl - a powerfull language that contains the the best of AWK and SED + much more
pr - print a file
print files or control printers - varies between BSD & SVR4
printf
not the C printf command but
a printf command for use in scripts to produce formated output
ps - list processes (BSD version)
ps - list processes (LINUX version)
ps - list processes (SYSTEM V version)
rwho - report who is on local network
sed - a line editor that is usefull in scripts
you can use ex or ed in scripts but sed is much easier to use
mainly because ex and ed often quit if something doesnt match
sendmail - the most powerfull mail program
see mail
see mailx - a better mail program
see pine - an even better better mail program
see netscape - a real mail program as opposed to pine, mail, and mailx
see fake e-mail unix allows you to send fake e-mail
sleep - go to sleep for n seconds
usefull in writting scripts, do something then wait, then do it again
for example to moniter a batch job till it finishes
sort - sort text
sort can delete duplicate lines of text with the -u option
the UNIX sort is much more powerfull then the MS/DOS sort
spell - check spelling
stty - set RS-232 parameters for terminal or line
su - temporarly log on as another user
su allows you temporally suspend the current session
and logon as another user. the user can be the super user or just
another normal unix user
tail - list the end of a file
usefull when your writting to a file and want to have
a 2nd window display whats at the end of the file as you
write to it
talk - talk to another user on the system
tee - tool to get a copy of output to STDOUT and a disk file
ls | tee krapola
1) ls command is piped to tee
2) tee writes output of ls to your STDOUT which is normally your terminal
3) tee also writes a copy of ls to disk file krapola
telnet - login to a remote computer
test - the if command is really a form of test
true
command always returns true
usefull in testing scripts
tr
tset
tty
uniq
passed a sorted file it only returns unique lines
unzip - unzip a file
see gunzip, gzip, unzip, zip, pkzip, pkunzip, gzcat, zcat, tar, unzip, zipinfo
users
uudecode
vi - a full screen editor
ex - the line editor is a part of vi
you can switch between vi and ex by
issuing the Q command in vi to switch to ex
or by
issuing the :vi command in ex to switch to vi
see emacs - for the latest and greatest full screen editor
see vim - a fancy freeware version of vi
vim - a fancy version of vi that does everthing but blow your nose
see emacs - for the latest and greatest full screen editor
see vi - the orginal model of vim
which - tell which path a command will be found in
$ which ls
/bin/ls
$ which aztec
/user/c/claypig/bin/aztec
see whence - korn shell only
see type
who
whois
get info about a internet domain name
$ whois compuserve.com
Domain Name: COMPUSERVE.COM
Registrant:
CompuServe Interactive Services, Inc.
5000 Arlington Centre Blvd
Columbus, OH 43220
US
Created on..............: Jan 25, 2000
Expires on..............: Oct 04, 2001
Record Last Updated on..: Jan 27, 2000
Administrative Contact:
Domain Support, CompuServe domains@aol.net
614 457 8600
Technical Contact:
Domain Support, CompuServe domains@aol.net
614 457 8600
Billing Contact:
Domain Support, CompuServe domains@aol.net
614 457 8600
Domain servers:
arl-name-svc-1.compuserve.com
149.174.211.5
dub-name-svc-1.compuserve.com
149.174.213.5
xargs
zcat - a UNIX version of PKUNZIP - Uncompress a file using Lempel-Ziv coding
see gunzip, gzip, unzip, zip, pkzip, pkunzip, gzcat, zcat, tar, unzip, zipinfo
zipinfo - get information about a zipped file
see gunzip, gzip, unzip, zip, pkzip, pkunzip, gzcat, zcat, tar, unzip, zipinfo
as - UNIX assembler
see dis
banner - create a banner page
basename - get file name from file/path name
see basename
cat - list contents of a file
cd - move to another directory
chgrp - change group of a file
chmod - change propertys of a file
chown - change ownership of a file
clear - clear the terminals screen
compress - compress a file
see uncompress
see zcat
uses same logic as pkzip
cp - copy a file
crypt - encrypt a files
but the logic is so old any 16 year old with a 486 can crack it
ctags - generate ctags file
with the file vi and ex can find C names
cu - connect to another computer
dc - desk caculator
dirname - get directory name from file path name
see basename
zcat - uncompress a file
see gunzip, gzip, unzip, zip, pkzip, pkunzip, gzcat, zcat, tar, unzip, zipinfo
see compress
see uncompress
uses same logic as pkunzip
uncompress - uncompress a file
see compress
see zcat
uses same logic as pkunzip
du - display disk usage
echo - print a line
used in scripts a lot
env - set or display enviornment variables
see printenv
groups - show groups a person is in
hostname - show name of machine
id - list group and user id's
line - read a line from the terminal
used in scripts a lot to read 1 line from the terminal
ln - create a link or alias name for a file
see cp
see mv
logname - get userid
used in scripts to get a persons userid
man - tell how a UNIX command works
printenv - set or display enviornment variables
see env
mesg - allow other users to write to your terminal
mkdir - create new directorys
more - system pager or scroller
see pg
see page
mv - move a file
see cp
see ln
news - get system news
nice - run slower
notify - disable/enable mail notification
passwd - change your password
pwd - print current directory
CVS - Concurrent Versions Systems
used to control version of software checked out by programmers
see sccs - Source Code Control System and RCS
rcs - Revision Control System
used to control version of software checked out by programmers
see sccs - Source Code Control System and CVS
reset - reset terminal
see tset
rm - delete or remove a file
rmdir - delete or remove a directory
ruptime - status of network machines
see sccs - Source Code Control System
sccs - Source Code Control System
used to control version of software checked out by programmers
see rcs - Revision Control System and CVS
shutdown - shutdown the UNIX machine
size - list size of object file
tar - backup files to tape, restore files from tape, also used to store and extract files from tarfiles which can be disk files
see gunzip, gzip, unzip, zip, pkzip, pkunzip, gzcat, zcat, tar, unzip, zipinfo
time - execute a program and time it
tin - read internet news groups
read postings from internet news groups
post messages to internet news groups
you know alt.news, alt.2600, alt.sex
see trn - threaded read news program
see rn - read news
see nn
touch - update a file
trn - read internet news groups
read postings from internet news groups
post messages to internet news groups
you know alt.news, alt.2600, alt.sex
see tin - threaded read news program
see rn - read news
see nn
troff - format output for typesetting
see nroff
see groff
umask
uname - get system name
units - convert from one unit to another
convert pounds to ounces
kilos to pounds
feet to meters
uptime - display system time stats
useradd - add a UNIX userid
userdel - delete a UNIX userid
usermod - modify a UNIX userid
uuname - list all uu systesm we know about
vacation - tell mail your on vacation
and mail will tell everybody that sends you mail your out of the office
w - tell what everybody on the system is doing
yes it will tell your boss your looking at dirty pictures with netscape
7:15PM up 42 days, 8:44, 20 users, load averages: 0.32, 0.26, 0.21
USER TTY FROM LOGIN@ IDLE WHAT
daddio p0 207-218-50-168.n 6:59PM 2 isca
reck p1 reck-laptop.phx. Wed04PM 1:59 -tcsh (tcsh)
brianh p2 208-178-107-51.e 6:53PM 2 -bash (bash)
jfb p3 gebirg.symlink.c Fri02PM 2days -bash (bash)
steveg p4 nd131225.global. 6:33PM 0 tin
mfried p5 farrah.primenet. Tue05PM 2:32 telnet primenet.com
pcj p6 kcse.com Wed03PM 20 -bash (bash)
holee p7 216.35.140.147 Wed03PM 0 pine 0 ""
ljericho p8 radsl-ljericho-0 6:12PM 14 bash
dvieira q5 pool0978.cvx28-b 7:13PM 0 tin
wait - wait till a process finishes
usefull in scripts
wall - send message to all users
have to be root to do this
wc - count words, characters and lines
whoami
$ whoami
asshole
$
write - write to another users terminal
yacc - Yet Another Compiler Compiler
see lex
Jump to the legal research section