User Tools

Site Tools


opus:fall2012:ccornair:start

Magician Casey Cornaire

The Great fall2012 Opus

Introduction

Hello, I am 31 years old and currently live in Campbell NY. I currently have a degree in Electrical Technology. I was not able to pursue a career in that field in the state of NY. Then decided to move to DC where I was still unsuccessful. Thats when I decided to try a different route and apply for an IT job for the department of justice. Having no experience I felt I would not get the job but they decided to give me a chance. I really excelled at the job after my training and was quickly promoted from phone support to remote support. After another short while I was promoted to level 3 desktop support. I then decided that this was the career I wanted and decided that I wanted to go back to school to be a system admin. I only have 3 small semesters to obtain this degree.

Part 1

Entries

Entry 1: August 29, 2012

On this day I started to learn how to navigate through the directories. This was signifigant because I was able to find my way and see what directories were there. Being so new to the class pretty much nothing makes any sense haha :)! Some of the challenges is just knowing where to navigate to find the directory I am looking for.

Entry 2: August 31, 2012

On this day I learned how to clone, update, commit, pull and push a repository from mercurial. This was signifigant because now I can submit projects, as well as, view projects that I have already done. I am still having some trouble with finding where the directories are so I can navigate to it.

Entry 3: September 26, 2012

ON this day I learned different way to use the wildcard functions, this was signifigant because it showed different ways to search for files and directories. I am still a little fuzzy on some of the search options, but I will practice.

Entry 4: September 27, 2012

On this day I learned different ways to manipulate the cursor in order to save time when editing text. This is signifigant for saving time when trying to write long strings of code and editing. I am still working on these techniques, so these are still new.

Keywords

unix Keyword 1

File Operations

Definition

The Processes of manipulating data and directories. Some examples of this are; reading, writing, creating, seeking and appending files or directories.

Creating a file or directory is essentially the same as writing in the sense of once the program is written, it has to use a compiler to convert it to machine language. Once it is converted, then it can be put in any directory specified and then called upon at a later time to execute

Reading a file is the process of the computer taking the output information that only the computer understands and converting into information that is readable to us. This process is done by interpreters and translators within the computer system.

Writing a file is the process of converting from a natural human language to a language the computer can understand. After writing a code in the system, a compiler such as VI is used in order to convert the information into an executable format that the computer can understand

Seeking is the process of repositioning the file read/write offset. This is done by using what is called a pointer, a pointer refers directly or (points to)information that is stored at another location in memory. So in other words, if the you cannot see the information until the information is “pointed to” or called from memory.

Appending a file is the process of rewriting a file that has already been written. This is done by pointing to the end of the text that was written and adding more the text desired

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

unix Keyword 1 Phase 2

Quotes

Definition

When using the double quotes, it means to quote exactly what is inside and disable any special characters that are within the quotes.

When using singlw quotes, the output, will always get you exactly what's inside the quotation marks, any special characters are disabled from their special meaning and just printed literally.

The use for the back quote is command substitution. Meaning that you are trying to replace something within the command with whatever is in the back quote.

References

www.codecoffee.com/tipsforlinux/articles/26 www.java-samples.com/showtutorial.php?tutorialid=1333 scott.sherrillmix.com/…/using-quotation-marks-effectively-in-unix/

Demonstration

Demonstration of the indicated keyword.

#include <stdio.h>

 
 int main()
{
    printf("hello, world!\n");
    return(0)
}

Experiment 1

Question

Will changing a relevant command in VI by a character or 2 completely change the outcome?

Resources

I just used techniques used in class to perform this experiment and then started manipulating the commands with no prior knowlegde of what the outcome would be.

Hypothesis

I think that just by changing the command string by a character or 2 will chnge the outcome quite a bit if not comepletely.

Basing by what we have learned in class changing a chanracter by either capitolizing, adding a period or even just removing a character or 2 will change the outcome of what happens after the change.

Experiment

I am going to type some lines in VI and then I am going to perform a command. Then I am going to change some of the characters of that command and record the results, then change a little from that command and so on.

Data

First experiment, using the command :%s/m/M/g- this took all of the m's in the entire document and changed them to a M. I them changed everything back and them used the same command but took the /g off of the end changing the command to :%s/m/M. By doing this it changed only the first m it encounters on every line to a M and leaving the rest on that line as it was, then moves to the next line doing the same and so on. I then went back to the original command of :%s/m/M/g and took out the % changing the command to :s/m/M/g. By doing this it changed only the m's on the current line instead of the whole document, I then changed everything back to its original state and then used the same command but I took the /g off the end changing the command to ::s/m/M. This only changed the first m to a M in the current line and then stopped.

Before: Hello, my name is casey cornaire and I am going to try a little experiment in order to test my hopthesis.                  
This test is going to prove that just by changing one or 2 characters will change the outcome quite a bit.
hopefully I will get an A on this and will pass the class.
I am trying to work hard and get a good grade, so maybe this will help
fj dfsklfds jfdklskj dlfjds;ll;aseriuewjfdns    dskfjorfiermnefdns;flads

After using the command  :%s/m/M/g:  Hello, My naMe is casey cornaire and I aM going to try a little experiMent in order to test My hopthesis.
This test is going to prove that just by changing one or 2 characters will change the outcoMe quite a bit.
hopefully I will get an A on this and will pass the class.
I aM trying to work hard and get a good grade, so Maybe this will help
fj dfsklfds jfdklskj dlfjds;ll;aseriuewjfdns    dskfjorfierMnefdns;flads 

Now results of eperiment when the /g is taken out of the original command changing the command to :%s/m/M
Hello, My name is casey cornaire and I am going to try a little experiment in order to test my hopthesis. 
This test is going to prove that just by changing one or 2 characters will change the outcoMe quite a bit.
hopefully I will get an A on this and will pass the class.
I aM trying to work hard and get a good grade, so maybe this will help
fj dfsklfds jfdklskj dlfjds;ll;aseriuewjfdns    dskfjorfierMnefdns;flads                                                  

Analysis

Based on the data collected:

  • Yes my hypothesis was correct, it truly did show that just changing one or 2 characters out of the original command will change the result quite a bit

Conclusions

By doing this experiment I found out the many possibilities that could happen when manupulating commands in a text editor. This could make things very comvenient when trying to change the value of many characters scattered through a document in one short. This also has proven to save time and promote many other theories of commands that can manipulated in order to achieve task quicker and more efficient. Glad I can enlighten you Master Jedi Haas hahaha!!!

Part 2

Entries

Entry 1: October 17, 2012

On this day we learned about the ps command.  This lets you see all of the processes running on your terminal.  To access this just type in ps in the command prompt 

there arent really any concept that I am having a hard time with. The main challenge so far is just absorbing and retaining all of the information given.

Entry 2: October 17, 2012

On this day we learned about the kill command and the many ways to use it. This is signifigant because it allows you to end any unneccessary processes running that could either slow down or stop the function of your terminal. Still having trouble remembering some of the processes and implementing them into script of programs.

Entry 3: October 26, 2012

On this day I learned about regular expressions. this is signifigant because they allow you to search for different things in a text document. I actually find this concept challenging because there are so many different ways to search and manipulate the data

Entry 4: October 19, 2012

On this day we learned about the sed command. this was sigifigant bc you can take an entire block of characters and change them to whatever you would like. I am kinda struggling with this command as well as the cut command but I am slowly getting the hang of them!

Keywords

Experiment 2

Question

By using wild cards, how does it change the search by just adding or taking out 1 character out of the string?

Resources

I am using skills and techniques used in class to demonstrate this experiment

Hypothesis

I am going to demonstrate different was to use wildcards and my hypothesis is that by just changing one character from the original string typed will make quite a difference in the results

Experiment

I am going to use different command such as ???? to search for directories and then change one or 2 things about it to see what the results are

Data

I am manipulating files in usr/sbin

using the command: ls -d ???? Result: arpd cpgr cppw cron nscd ntpd pwck rdev sshd tcpd vigr vipw I had bash search and display all files with four characters I then changed the code to ????* the result: pam-auth-update vigr pam_getenv vipw paperconfig visudo pwck vpddecode pwconv

this gave me every wordthat was at least 4 letters

using the command: ls -d *[aeiou] result: biosdecode libgvc5-config-update register-common-lisp-source update-mime cytune logrotate rtcwake validlocale I only displayed a few: this result gave me all the words that ended with a vowel I then changesd the code to [aeiou]* the result that was givn was :accessdb ispellconfig update-inetd add-shell ownership update-info-dir I only displayed a few: this result gave me all the words that began with a vowel

Analysis

Based on the data collected:

yes my hypothesis correct. There were no short comings in this experiment.

Conclusions

While doing this experiment, I realized that by just changing one character in a command string it will greatly change the results from the previous string

Part 3

Entries

Entry 1: November 9, 2012

On this day we learned about the diff command. This is signifigant bc you can compare files line by line. I am still struggling a little with the cut command and just need some more practice

Entry 2: November 9, 2012

on this day we learned about the head command. This is print a certain number of the first lines in a file, you can specify how man lines or just use the default of 10. This concept i amkinda struggling with but am working on the different ways to print the number of lines needed.

Entry 3: November 9, 2012

On this day we learned about the tail command. This is signifigant bc you can print the last lines of your choosing in a file, you can choose how many lines with an option or you can just use the default of 10. I am struggling with using the head and tail commands together to print out specific lines in a file.

Entry 4: November 9, 2012

This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.

As an aid, feel free to use the following questions to help you generate content for your entries:

  • What action or concept of significance, as related to the course, did you experience on this date?
  • Why was this significant?
  • What concepts are you dealing with that may not make perfect sense?
  • What challenges are you facing with respect to the course?

Remember that 4 is just the minimum number of entries. Feel free to have more.

Keywords

unix Keyword 3

head

Definition

head is a command used to display the first few lines of a text file or piped data

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

en.wikipedia.org/wiki/Head_(Unix)

unix Keyword 3 Phase 2

File removal

Definition

This is used to delete files from the filesystem in linux

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

  • Reference 1
  • Reference 2
  • Reference 3

Demonstration

Demonstration of the indicated keyword.

lab46:~$ rm hello rm: remove regular file `hello'? y lab46:~$

Experiment 3

Question

what are different ways regular expressions can be used?

Resources

using knowledge gained in class.

Hypothesis

Using regular expression can be very useful when searching words in files, changing one thing in the code will effect the outcome by quite a bit

Experiment

I am going to pull up a file and do certain regular expressions and then change something in it and record the results.

Data

I am referencing /usr/share/dict/words and am only posting few results cat words | egrep “\<pre|\<post” preachy preamble preamble's preambled postbox's postcard postcard's postcards

this gave me all the words that began with pre or post

I then changed it to cat words | egrep “\<pre|\>post” preachy preamble preamble's preambled preambles preambling

this made it so it displayed all words that began with pre or ended with post

Analysis

Based on the data collected:

Yes my hopethesis was correct.  No with the examples I did I received exactly what I though would happen

Conclusions

When using regular expression, just by changing one character in the command will change the results quite a bit

opus/fall2012/ccornair/start.txt · Last modified: 2012/12/31 04:33 by 127.0.0.1