Quiz 2 (Due in or before class, 3nd week)

Question 1: Text manipulation
Use this passwd file for this question. Give a command that will alphabetize the login names in the file. Give a command that will sort the file by UID. Give a command that will tell you how many users use "bash" as their shell.

Question 2: File types
When you are making a hard link to a file, the link has the same owner and permissions as the original file. But with a symbolic link, the link is owned by you, and has bizarre permissions. Why is this not considered a difference in functionality (i.e. does this actually change the way you can use the links)? Give an explanation for why only root can hard link directories.

Question 3: Processes
Login to "orcus.cs.uchicago.edu" and run the following: "/usr/ucb/ps auxww | grep flynn". Discuss what you see that is irregular. Explain why/when this happens. Look at ~flynn/foo.c for the source code.

Question 4: Manual pages
Read the manual page for "man" (i.e. run "man -M/usr/man man"). Explain what the difference is between the pages output with: "man -M/usr/man -s 1 chmod" and "man -M/usr/man -s 2 chmod".