User Tools

Site Tools


haas:spring2010:unix:eoce

~~TOC~~




Corning Community College


UNIX/Linux Fundamentals



End of Course Experience

Rules

Presented within will be various questions evaluating your knowledge and experience gained this semester. In places where you are able, the more you write and explain topics the better the chance you will have of receiving full credit (and alternatively, the more credit you will receive should something be incorrect).

The questions on this experience are open resource with the exception of other individuals. In that respect, it is CLOSED PERSON. This means you are not to communicate with other people (either in the class or otherwise), in real life or electronically. Use your own knowledge, use your skills, and use your ability to access the allowed resources to aid you in coming up with your well thought out answers to each question.

You are allowed, and expected, to ask me questions, so that a problem can be better clarified.

There are three parts to this experience:

  • Part I: 8 items, covering all the various concepts we've covered throughout the semester.
  • Part II: 3 scripts.
  • Part III: 4 items, involving the course and various perspectives you got out of it.

You are to do all questions. Submission is preferred in a plain text electronic format, such as in an e-mail with program attachments on Lab46.

You have until 11:59:59pm (that's 23:59:59 in 24-hour time) Thursday, May 20th, 2010 to complete and submit this to me.

If desired, our scheduled finals week meeting time is: Wednesday, May 19th, 2010 from 2:30pm-5:30pm in B003 (our regular room).

Good luck!

Part I: Questions

Micro-Quest 0: Permissions

For the following permissions:

a. drwxr-x--x
b. crw-r-----
c. -r---w--wx
d. p--xrw-rwx
  • Tell me the octal permissions for each.
  • Tell me what type of file for each.

Micro-Quest 1: RegEx

Write me regular expressions that, when used against a file like /usr/share/dict/words, will return only the following (give me the entire command-line or regex, AND number of results):

a. All the 6 letter words that begin with "pre" XOR end with "ing".
b. All the words that begin with "pre" or "post" and do NOT end with "ing".
c. All the words whose even placed characters are a vowel (only lowercase, 'y' excluded).
d. All the words whose even placed characters are a vowel (only lowercase, 'y' included).
e. All the words that do not contain any of the letters 'a' or 'A'.
f. Words that do not contain any of your initials (first, middle, last, upper, and lower).

Micro-Quest 2: Mystery

In the /var/public/unix/eoce directory is an executable named mystery. Run this program and tell me the following:

a. Does the program output to STDOUT or STDERR?
b. How can you prove this?

Be sure to justify your answer and provide proof that backs up your claims.

Micro-Quest 3: Files

The /etc/shadow file contains account password information for certain users on the system.

a. How would you show me the encrypted password for one of the accounts?
b. If you try it, are you able to accomplish the task? Why or why not?
c. Why do you suppose that is?
d. What would be the benefit of doing something like this?

Be sure to answer ALL four parts.

Micro-Quest 4: Paths

Tell me whether each of the following is a relative or absolute path:

a. /usr/local/bin/usage
b. bin/bash
c. /usr/share/../../tmp
d. ./var/lib/dpkg

Micro-Quest 5: Files

Tell me what type of file (regular, directory, special) for each of the following, and provide your reasoning for such:

a. /etc/group
b. /usr/lib/libpng12.so.0
c. /dev/pts/*
d. /proc/cpuinfo

Micro-Quest 6: Matching

What tool(s) would I use to access/process the following in the most common sense fashion? Identify what the file is, and show me an example command-line

a. stuff.tar.gz
b. trees.bz2
c. text_file_with_100_lines_you_want_to_read
d. roms.zip

Micro-Quest 7: Wildcards

Show me how you'd list the following:

a. All the files in the base of /proc that contain 4 characters and begin with a '1' or a '2'.
b. All the files in the base of /dev that end with '6' or 'v' or 'V'.
c. All the files in the base of /etc that begin and end with an 'r','s','t','l','n', or 'e'.
d. All the files in /bin that are symlinks AND 6 characters in length.

Part II: Scripting

Micro-Quest 8: Tetris Score Listing

The text-based tetris-bsd on Lab46 enjoys considerable usage. It maintains a scoreboard of all who have played and how high they've placed (and on what level).

I'd like for you to take the tetris scores and write a shell script that will turn it from its multiple page double column output to a unified single-column list.

From that list it creates, identify the user who has the most entries in the high score table, as well as the users who have placed on level 4.

Micro-Quest 9: A 'last'ing impression

Utilizing the last utility, write a script that will output the following information:

  • how many unique IP addresses contacted Lab46 for successful login this month?
  • which user had the most bad logins for the month of April?
  • which IP address(es) contacted Lab46 the most (you choose- April or May)?
  • which IP address(es) contacted Lab46 the least (you choose- April or May)?
  • if an argument is given, assume it is a user
    • validate the user (id command), if not a valid user then print appropriate error and exit
    • tally total successful logins for April and May
    • tally total unsuccessful logins for April and May

Micro-Quest A: emordnilaP as a Palindrome

Write two scripts, each one accepting as input two strings.

Each script must validate whether or not the two input strings are palindromes (or not), and output a message appropriately.

Each script must perform its palindrome processing in an entirely different way from the other.

The intent here is to come up with fundamentally different ways of solving a problem.

Part III: Things that aren't in the first two parts

Micro-Quest B: The UNIX Philosophy

What is the UNIX philosophy?

And how does that philosophy play a part in various places on a UNIX system, and even in various ideals behind coming up with solutions and computing in general?

Micro-Quest C: * vs. *.*

The first UNIX filesystems allowed for filenames to be up to 14 characters in length. As time went by, this limit increased to 255 characters, and even larger (around 10,000 characters). In UNIX, there is no concept of an extension (ie in MS-DOS you have 8 characters followed by a 3 letter extention– known as 8.3 notation). However, the concept of the file extension is still in common use but used to help the user distinguish files (just as with the –color=auto option to ls(1), files are colorized). The underlying operating system doesn't care what extension or color the file is, but it can be useful to the user.

In DOS, a common wildcard to specify all files is: *.*

In UNIX, why is * better than: *.*

Explain your answer.

Micro-Quest D: FAQ

A big part of our explorations this semester involved discovering knowledge, both the intrinsics that make UNIX make more sense in general, and knowledge that the greater internets seem to have scattered about the ether.

The class wiki has been a centralized place for the collection of this data, and now I'd like to fine tune it a bit, and perhaps create a resource that others on the internet can use when exploring UNIX.

Located at faq:unix is the FAQ list I've created for this class and EoCE. I would like for EACH of you to come up with 8 questions and answers to contribute to the FAQ. These can include any aspect of exploring and utilizing UNIX this semester. But 8 distinct questions/answers from EACH person in the class.

The FAQ page contains some additional syntax for use with FAQ lists (even though it may not display in any unique way– yet).

Be sure to, as content develops, to organize/categorize as appropriate under subsections. I don't just want section headings containing each person's name.. I want categories, with multiple contributions beneath each category. The wiki keeps track of who did what, so don't worry about identifying what you specifically did on the FAQ content (aside from a signature trailing each Q and A submission).

The intent is to try and make this document what something that would have been very useful to you when we started out at the beginning of the semester.

Micro-Quest E: Your Perspective

After an exciting and intellectually challenging run, we're arriving at the end of this semester's journey. The course as we all experienced it, unfolds in a manner pertaining in part to how you respond to concepts and topics (do we need more time, can I crank it up a couple notches, etc.) so each semester and each class is entirely different from any other- because of each of you, and all of us, working together and learning together.

So, searching deep down within your soul- balancing reason with emotion, and considering attendance and timeliness; answer me the following:

  • What grade do you feel you deserve for this course?
  • Why do you feel you deserve this mark? (Justify your answer based on your own perceived performance, not on need.)
  • How did you feel about the course?
  • Was it useful/interesting to you?
  • What was your least favorite aspect, and why?
  • What was something meaningful to you with respect to the course? Why does this stick out in your mind?
  • Any other comments or suggestions?
haas/spring2010/unix/eoce.txt · Last modified: 2010/05/06 18:41 by 127.0.0.1