Presentation is loading. Please wait.

Presentation is loading. Please wait.

Week Six Agenda Announcements Link of the week Review week four lab assignment This week’s expected outcomes Next lab assignment Break-out problems Upcoming.

Similar presentations


Presentation on theme: "Week Six Agenda Announcements Link of the week Review week four lab assignment This week’s expected outcomes Next lab assignment Break-out problems Upcoming."— Presentation transcript:

1

2 Week Six Agenda Announcements Link of the week Review week four lab assignment This week’s expected outcomes Next lab assignment Break-out problems Upcoming deadlines Questions and answers

3 Link of the week http://en.wikipedia.org/wiki/Computer_security This article describes how security can be achieved through design and engineering http://en.wikipedia.org/wiki/Secure_Computing Firewalls, Safe Word authentication products, Internet filtering products like Smart Filter, Bess, and Webwasher

4 Link of the week Define: Trusted System Define: Trusted Computing Where are trusted systems utilized? How are trusted systems utilized?

5 Review week five lab assignment

6 Define a makefile Comments within a makefile (#) makefile continuation lines (\) Rule tells make both when and how to make a file Dependency Line is a line with a colon (:) test_build.sh contains the make command which calls the makefile Demonstrate makefile script under ~dandrear/temp (Einstein)

7 Review week five lab assignment What is the makefile utility used for? Other software products that perform similar bundling operations - ANT developed by Apache Jakarta - ANT2 supplied from the Free Software Foundation which is part of Red Hat. What is a dependency between source files? main.cpp  employee.cpp  address.cpp What are the two parts of a dependency rule? 1) What files a file is dependent on 2) Rule that tells how to recompile the file What are the differences between a makefile and a shell script? The rules in a makefile are executed based on dependency, and not sequential order. Scripts execute in sequential order.

8 Review week five lab assignment Target : Dependencies (prerequisites) Rule prog:a.o b.o c.o g++ a.o b.o c.o -ly –o prog a.o: prog.h a.c g++ –c prog.h a.c b.o:prog.h b.c g++ –c prog.h b.c c.o:c.c g++ –c c.c c.c:c.y yacc c.y mv y.tab.c c.c

9 Review week five lab assignment

10

11 Key Points About Makefile 1.Makefile recompiles all source files for a project. 2.Makefile only recompiles files that have been changed. 3.Bottom up control flow 4.Rules may be complex shell commands

12 Review week five lab assignment Key Points About Perl 1.Dynamic typing 2.Dynamic allocation of memory for arrays and hash tables 3.Both procedural and object oriented programming capabilities 4.Rich third party software and use of modules

13 Review week five lab assignment Regular expression (a.k.a. regex or regexp) Is a pattern that describes a certain amount of text. A basic regular expression could be the single character, e.g.: a Jane is a women. It will match the first occurrence in the string. If succeeding matches are desired, the regex engine must be instructed to do so.

14 Review week five lab assignment Perl Hash table is an unordered set of scalars, accessed by some string value that is associated with each scalar. %colormap=( “12” => “gray”, “19” => “black”, “30” => “red”,); %colormap = (“12”, “gray”, “19”, “black”, “30”, “red”);

15 Review week five lab assignment

16 Week six expected outcomes Upon successful completion of this module, the student will be able to: Create makefile scripts for software programs. Use pattern rules in make files. Create an effective PowerPoint presentation. Create make files with multiple targets. Install software packages on a server.

17 Next lab assignment Installing software under UNIX is not always straightforward and easy. System administrators must be familiar with the layout of the file system. During a software installation, the possibility exists that the system could panic and/or have a hard disk failure.

18 Next lab assignment Installation Software Package Methods Package manager - What are the tasks of a package manager? - The version of UNIX dictates which package manager will be used. - Many Linux versions utilize the Debian Package Manager. Manual - The utilization of makefiles or shell scripts to automate the install as much as possible. - Many times the installation of software is done by sending the source code to the site. - What steps are required to install a new software version? - How is a “configure” script utilized?

19 Next lab assignment Assignment number: 5-1 test scenarios Command line:./listdir.pl Command line:./listdir -l Command line:./listdir -l -d Command line:./listdir -d

20 Next Lab Assignment $dirLoc="."; # Default to current working directory for ($a=0;$a<=$#ARGV;$a++) { # Verify that the option is a “d” if ($ARGV[$a] eq “XXXX") { $dir=1; if (-d $ARGV[$XXXX]) { # Assign the second argument (directory) to a variable $dirLoc=$ARGV[$XXXX]; } else { $errorDir=1; } # Verify that the option is a “l” } elsif ($ARGV[$a] eq “XXXX") { $long=1; }

21 Next Lab Assignment # Open the directory that was assigned to # $dirLoc variable opendir(XXXX, "$dirLoc") || die "Cannot open directory.\n"; # Assign all file names to array @unfiles=readdir(XXXX); $z=1; # Sort file names in ascending order @files = sort { uc($a) cmp uc($b) } @XXXX;

22 Next Lab Assignment foreach $file (@files) { if (-f "$dirLoc/$file") { if ($long) { if ($z==1) { printf("%-30s%10s%10s%10s\n","File Name","Size","User","Group"); } ($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $mtime, $ctime, $blksize, $blocks) = stat "$dirLoc/$file"; $group=getgrgid($gid); $user=getpwuid($uid); printf(“%30s%10.f%10s%10s\n”, $file,$size,$user, $group); printf("%30s%10.f%10s%10s\n", $file,$size,$user,$group); } elsif ($nolong) { $printFiles.="$XXXX, "; } else {

23 Next Lab Assignment if ($z==1) { printf("File Name\n"); } print "$file\n"; } $z++; }

24 Next Lab Assignment if ($nolong) { chop($printFiles); print "$printFiles\n"; } closedir DIR;

25 Next Lab Assignment shell Kernel Hardware Assembler Firmware

26 Next lab assignment Demonstrate: Execute Fall08_solutions/listdir.pl script

27 Break-out problems touch command dot command dot dot command What function does the makefile provide a project? What are the two parts of a dependency rule? What language is used for writing makefile rules? What two methods are used for installing software packages? What is a regular expression American National Standard Institute (ANSI)

28 Upcoming deadlines Mid-Term review (True/False, Multiple choice) Mid-term exam dates 10/20 – 25/08. makefile Exercise, 6-1 is due 10/21/08. Create the specified files referred to in Lab Assignment 6-1. Programming Assignment 1, 5-1 is due 10/28/08. Installation Exercise, 8-1 is due 11/4/08.

29 Questions and answers Questions Comments Concerns Are there questions regarding the mid- term outline? After class I will help students with their scripts.


Download ppt "Week Six Agenda Announcements Link of the week Review week four lab assignment This week’s expected outcomes Next lab assignment Break-out problems Upcoming."

Similar presentations


Ads by Google