Before I started actually working on the code for the C transliteration
program tr2b.c and tr2u.c, I made sure that I understood the tr command
and what its doing. I sketched everything out on paper and once I understood
what was going on, I moved on to w
)For this section of the lab, I was given the responsibility for setting up
Due to some resistance from the servers, it was much wiser to use ubuntu from the
actual machines rather than connecting to the server.
*Got Ubuntu Installed using th
command: wc -l random.txt
Did a line count and got 10,000,001 lines in the file
*Opened the file in emacs and manually deleted the first line which was an
*Rechecked line count and got 10,000,000 lines in file*
command: wc -l random
1. Had the other team been observing all the bytes going across the network,
the network would still be secure because the data being carried out would
be encrypted which is pretty important. Because its encrypted, the bytes being
transferred across the
Made the directory ~/coreutilsInstall in my home directory. Place
where I will be installing coreutils. Operation successful!
Changed to the directory where coreutils will be installed
import sys, locale
from optparse import OptionParser
def printCol(s, col, opts):
if col is 1:
elif col is 2:
if not opts
LAB 2 LOG :
command : touch lab2.log
Used the touch command to create the lab2.log
file. Operation successful!
command : locale
Check if output is LC_TYPE="C".
command : export LC_ALL='C'
Verified again after running the export
/* Generate N bytes of random output.
/* When generating output this program uses the x86-64 RDRAND
instruction if available to generate random numbers, falling back
on /dev/urandom and stdio otherwise.
This program is not portable.
1. Wrote a simple Hello World program > called hello.c > compiled it
command:emacs -nw hello.c
gcc hello.c -o hello
2. Used the ldd command as w
1. File was removed to make sure line will not go to the goto statement
when goes through if statement.
2. If my company adopted this patch, company should keep an eye out for
the programs that use the YYYY-MM-DD format because they will be affected
Directory that I will be working with on this assignment
Inside gitRoot (main working directory)
Enabled version control git repo
command:git clone git:/git.savannah.gnu.org/diffutils.git
Output lines selected randomly from a file
Copyright 2005, 2007 Paul Eggert.
Copyright 2010 Darrell Benjamin Carbajal.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public Li
Author: Andreas Grnbacher <[email protected]>
Date: Thu Sep 24 07:36:31 2015 -0700
diff: Improve help text of option -label
* src/diff.c (option_help_msgid): Improve help text of option -label.
Was downloaded correctly from the internet and put into the
command: tar xzvf coreutils-with-bug.tar.gz
Used tar command to decompress the tar file
Command: man man
Typed the command 'man man' and typed out '/all' which searched for the keyword
'all' and tracked the appropriate answer by scrolling until reaching the
Command: which cp
1. m a n SP m a n Enter / a l l Enter q
2. w h i c h SP c p Enter w h i c h SP w c Enter
4. r e a d l i n k / u s r / b i n / c c
5. m a n SP c h m o d Enter / g - s Enter q
6. m a n SP f i n d Enter / t i m e Enter q
7. f i n d SP - m t i
Contiguous block of memory containing
The stack pointer (SP) points to top of
Bottom of stack is at a fixed address
Stack consists of logical stack frames that are
pushed when calling a func
System Call Programming &
Mode bit used to distinguish between
execution on behalf of OS & execution on
behalf of user.
Supervisor mode: processor executes
every instruction in its hardware repertoire.
User mode: can on
The Shell and OS
The shell is the users interface to the OS
From it you run programs.
Scripting Languages Versus
Ex: C/C+, Java
Programs are translated from their original source
Introduction to Linux
Week 1 - Monday
On BH3760 computers
Dont Install Ubuntu
ID: SEAS ID
PW: SEAS password
On other computers
Install or try Ubuntu
Introduction to Linux
Week 1 - Wednesday
A Brief History of Operating
The Dark Ages
No OS until 1960s
Manually loaded programs
Reboot after each program
Unified application development across systems
Output via printer, later via mon
W4118: interrupt and system call
Motivation for protection
Need for protection
Kernel privileged, cannot trust user processes
User processes may be malicious or buggy
User processes from one anothe
CS 35L Software Construction Laboratory (Lab1-B)
Wed, Sept 28, 2011
How can I install Linux into my own laptop?
Two opitions: 1) Ask Linux working group for help
2) Use VirtualBox (http:/piazza.com/class#fall2011/cs35l/4)
How should I prepare lab1.lo
CS35L in-class Presentation topics
1. Object Oriented Programming
2. Interesting Linux tools(any interesting Linux tools we havent covered in class)
3. Software evaluation and testing
4. Web-based software construction
5. Operating Systems
6. Database Sys