Summary
of UNIX Labs
Lab 1
Vi
Editor
insert and append mode
command mode
escape key
typing in information in the vi editor
saving the document
making changes in a file
moving to the top or bottom of the document
moving around in the document
searching for words or sequences of letters
making changes in words or adding new words
deleting words or lines
changing lines to other locations in a
document
changing words and other error corrections
adding new lines
joining line together
saving the file
exiting the computer
Lab 2
man - on-line
help manual
who - who is on the system
more - displays
info on screen one screen at a time
pipe - connects commands together
finger - who
is on the system
cat
- displays contents of
files and concatenates one or more files
wildcards - abbreviate
file names using * and ?
redirect - send
output from command to a file instead of screen
append
- add on to end of a file that already exists
ls - lists
files in directory C just name of files
ls -l
- lists long version of files - more information on files -
permission codes
ls -a - lists invisible files (those with a
period in front of name)
cp - copy
command
mv - renames
a file
rm - deletes
file
Lab 3
Directory
structure in UNIX
file
- collection of related information
directory - special
files where like files are kept
plain - collection of related information
root - top of tree structure
home - person=s home directory
systems - directory
used by the system to store files
pwd - print
working directory
mkdir - make
a new directory
cat - used
as an editor
cd - change
directory
rmdir - remove directory
wc - word
count
wc -l displays only number of lines in file
wc -c displays number of characters in a file
wc -w
displays number of words in a
file
lp - print
to printer
date - date
information
cal - calendar
for months
Lab 4
sort - sorting
files, sorting on more than one field, sorting data with more than one word in
a field
sort -b ignores
leading blanks - sort includes leading blanks to be part of field they
precede
sort -f folds lowercase into uppercase
sort -n numeric sort, it uses arithmetic order as
compared to ascii order
sort -r reverses
order of sort
diff - displays differences between
files
uniq - displays a file removing all but one
copy of repeated lines
uniq - c precedes
each line with number of occurrences of line
uniq - d displays
only lines that are repeated
uniq - u displays
only lines that are not repeated
grep - searches file for a specific pattern
grep -i ignores
case of alphabetic characters
grep -n precedes
each line printed by its relative line number in input file
Lab 5
cut - cuts
out only certain fields of a file
cut -c specifies
that you want to cut specific character positions
paste - combines
columns of data from different files
paste -d delimiter
between columns - cuts down extra spaces
head - lists only the first part of a file
(10 lines)
tail - lists
only the last part of a file (10 lines)
+ option to count from beginning of the file
spell checks
for spelling errors in a file
bc calculator
used in UNIX
find finds
path name to a file
find -name finds
criteria that matches the name
Lab 6
Based
on using the Korn shell as the default shell
shell scripts - commands
combined into files to be executed at one time
shells - Bourne, Korn, and C shells , find out
what shell you are in
sh- the Bourne shell
ksh - the Korn shell
csh - the C shell
print - lists out info to the screen - used
in Korn shell
echo - lists out info to the screen - in
Bourne shell and C shell
chmod - changes
access codes
symbolic - using different combinations of symbols and
letters
numeric - using numeric equivalents for desired
permissions
shell
variables - user defined shell variables
shell scripts - file
that contains commands to be executed by the shell
calendar - type in dates and appointments - UNIX
lists out day before date
Lab 7
Korn
shell (ksh)
startup
files
.profile
environment variables
user-created variables
.kshrc
aliases
command
line editing
history
read
comment
statements
other
meanings to read command in Korn shell
special
meaning to certain characters in print
Lab8
Korn
shell information
Usage
of quotes
double
quotes
single quotes
back quotes
backslash characters
making
short shell scripts to be used in all directories
finding
a file
printing
off a file
chmod
procedure
command
substitution
relational
operators in Korn shell
arithmetic
expressions
declaring
integer variables
for
in
if
- then - elif - else - fi
while
script
command
date
options
case
Lab 9
Bourne
shell information
Changing
into the Bourne shell
making
shell scripts in Bourne shell
print out a file
chmod
file
Bourne
shell flow of control structures
test
command
relational
operators
for
for
in
if
- then - else - fi
if
- then - elif - else -fi
while
until
case
arithmetic
operators
error
messages
Lab 10
Using FrontPage to make Web pages
Finding student’s H drive
Finding and saving graphics
Making hyperlinks
Previewing Web page on Netscape
Adding bookmarks to document
Linking first and second pages
Looking at the HTML code
Setting up UNIX account with public_html directory
Using ftp to transfer files to UNIX machine
Lab 11
C
shell
chsh
.login
file
.cshrc
file
alias
history
read
making
shell scripts
finding
a file
printing
a file
changing
access permissions
set
primary
and secondary prompts
Lab 12
C
shell and flow control structures
foreach
relational
operators
if
goto
if-then-else
if-then-else-endif
while
switch
arithmetic
expressions
errors
in the C shell
du
clearing
screen
processes
ps
background
processing
kill
Lab 13
C and Java input and output features
C program -
compiling and running a C program
printf
scanf
Java program – compiling and running a Java program
println
readln