Assignment 3

Back Up Next

horizontal rule

Home
Assignment 1
Assignment 2
Assignment 3
Assignment 4
Assignment 5
Assignment 6
Assignment 7

 

50 pts Due date announced in the discussion board under Weekly postings and the calendar.

Assignment 3

Due Date: see Discussion board and online calendar

50 Points

Please make sure to include you full name on all the submitted material and include the questions.

Instructions:

Login to UNIX and do the following steps interactively (meaning do your homework while connected to our unix system so you can actually do the commands while answering the questions). Do not try to guess the answers, follow the steps while logged in the unix system.

Write in your answers,( the command lines you use in each step). You may want to copy the answers from the body of your putty session. Note that putty has an option to log all your work in a text file. We worked on a lab showing the steps

 http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter4.html#config-logging .


In other words, your log file will be a little messy since you have have made errors, etc, I don't need to see that. I just want the answers with the questions. So, open the log file in notepad , clean it up and put the questions on the top of the log session answering that particular question.

Also, you have a command script in bash that can be used to record your session, then you will need tro transfer it to your home system and post in the dropbox.

Note that each step may depend on the previous and there may be more than one way to do some of the steps (one answer is enough). Also, if the answer is too long, just use part of it and write  ------ cut --------- 

Attach only a .txt file produced by notepad or another program that produces text file.

BTW.. You can use putty and open more than one connection to syccuxas01, so you can have two sessions going at the same time. If the command ask you to erase or do something that might damage your files or change permissions that will disable your loging make sure to change it back or create temporary files that can be removed.

Each question has its own point system. For instance, if an assignment has 10 questions and it is worth 50 points, each question will be worth 5 points, etc.

When I correct your assignments, there will be series of *** in front of an answer, indicating that the answer is either incomplete or complete wrong. The points will be deducted accordingly. -1 for very minor error, 3 or more for major errors. The key for the assignments will be found under Content-assignment/lab answers.

Make sure to submit all of your assignments in the dropbox.

Always include the assignment questions (except assignments 6, 7), otherwise 10 pts will be deducted. Also, attach ONLY  .txt files, NO Word or PDF files.

Putty has a feature to record what you see on the screen, explained here as well http://www.youtube.com/watch?v=ufE5pLjEN0s

Log on to your UNIX system

1. Give three different commands to get back to your home directory.

2. Show the names of all hidden files in your home directory. Show your session.

3. Write down the following and show the session that you used to obtain the required information:

  1. Your user name (also known as login name)
  2. Your user ID
  3. Your group ID and group name
  4. User names of users in your group
  5. Number of groups that you are a member of

 

4. What are the permissions for your home directory set by your system administrator? What command did you use to answer the question? Show your session.

5. Suppose that you want to block everyone (except you) at the main door (your ~ direcotry) of your directory hierarchy (i.e., your home directory-not the files inside the directory), as shown in Figure Lab7.1 (below). Take the necessary steps to do this. Show the session that you used to accomplish the task and confirm that the task has actually been done.

6. What do . (dot), .. (dotdot), and ~ represent in UNIX? Show use of all three.

7. What is an inode number in UNIX? Show the command for displaying the inode numbers for the root directory and your home directory.

8. Give the command for removing an empty directory called personal under your home directory. How would you remove it if the personal directory is not empty?

9. Create a file, called sample, in your home directory and set its permissions to read and write for yourself, read for users in your group, and none to everyone else. What command did you use to create the file? What command did you use to set privileges?

10. Suppose that umask is set to 022 on a system. What will be the default permissions for the new directories and text files that you create? Explain your answer.

11. Assume that you have two files, f1 and f2, that you want to concatenate and store in a file called f1nf2. Show the cat command needed to perform this task. Now show the cat command needed to put your name, taken from the keyboard, as the last line of f1nf2.

 

.

 

horizontal rule

Back to CS140U Homepage
This page was last modified September 26, 2004
wmorales@pcc.edu