Corning Community College
UNIX/Linux Fundamentals
End of Course Experience
~~TOC~~
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:
You are to do all questions. Submission is to be in an organized and easy to read format in a plain text file, such as in an e-mail with attachments on Lab46, sent to wedge@lab46.corning-cc.edu and yourself.
You have until 11:59:59pm (that's 23:59:59 in 24-hour time) Wednesday, May 18th, 2011 to complete and submit this to me.
Although we do not have a scheduled finals week meeting time, you are welcome to come to the BDC, Room B003 for questions on:
Good luck!
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).
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/libsvn_diff-1.so.1.0.0 c. /dev/pts/* d. /proc/cpuinfo
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.
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.
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
For the following permissions:
a. drwxr-x--x b. crw-r----- c. -r---w--wx d. p--xrw-rwx
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.
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 of extracting/gaining access to the respective content
a. stuff.tar.gz b. trees.bz2 c. text_file_with_100_lines_you_want_to_read d. roms.zip
A large part of our activities this semester involved learning how to use the system as a user and developer. Another important aspect of using systems is in their administration, known commonly as “System Administration”. As a System Administrator, one has higher privileges (ie access to the root superuser account) and is responsible for ensuring proper operation of the system and appropriately extending desired functionality.
Your task in this question is to play the role of the System Administrator and extend the functionality of a system.
I have set up a system for use, running another Open Source UNIX variant called NetBSD. The system is called eoce.student.lab and can be reached via SSH from Lab46.
Your task is to log into the system, become root using the su command, choose a yet-to-be-installed package from the list and figure out how to install it, investigate your package, perform any necessary configurations.
Some useful information:
Please answer the following:
Don't forget to edit the file that displays on login to mark off what package you've installed so others don't try to install a package that is already installed.
Utilizing the last utility, write a script that will output the following information:
NOTE: All successful logins to Lab46 will also generate a corresponding login failure. So you will see the number of bad logins being artificially high. This does not make the information useless- it still contains genuine information on bad logins.
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.
On the eoce.student.lab NetBSD VM we explored in a previous question, I'd like for you to return and accomplish the following tasks:
Be sure to answer for me:
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.
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. I would like for EACH of you to contribute the following:
These can include any aspect of exploring and utilizing UNIX this semester. But 8 distinct questions/answers from EACH person in the class is required.
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 something that would have been very useful to you when we started out at the beginning of the semester. For all those who have made use of Google this semester to look up information to help you on a lab or case study– I want this FAQ to be as valuable as that external data you found.
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?
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:
When done, compose an e-mail to me with your responses to the various questions. There is no electronic submission form for the EoCE.
Be sure your e-mail is organized and easy to read!