Вы находитесь на странице: 1из 28

UNIX File Structure and Operating Conventions

25B10I02 / Version ADT1


01 May 2009

SECTION I. ADMINISTRATIVE DATA

All Courses Course Number Version Course Title


Including This 113-25B10(R1) ADT1 Information Technology Specialist
Lesson

Task(s) Task Number Task Title


Taught(*) or
Supported
INDIVIDUAL
113-581-1007 (*) Install an Operating System (OS) Using a Graphical User
Interface (GUI)

Reinforced Task Number Task Title


Task(s)

Academic The academic hours required to teach this lesson are as follows:
Hours
Resident
Hours/Methods
4 hrs 30 mins / Conference / Discussion
5 hrs / Practical Exercise (Hands-on)
Test 0 hrs
Test Review 0 hrs
Total Hours: 9 hrs 30 mins

Test Lesson Hours Lesson No.


Number
Testing
(to include test review) 2 hrs 10 mins 25B10IEX version ADT1

Prerequisite Lesson Number Lesson Title


Lesson(s) 25B10I01 UNIX Operating Systems Overview

Clearance
Security Level: Unclassified
Access
Requirements: There are no clearance or access requirements for the lesson.

Foreign
FD5. This product/publication has been reviewed by the product developers in
Disclosure
coordination with the Fort Gordon, GA foreign disclosure authority. This product is
Restrictions
releasable to students from all requesting foreign countries without restrictions.

1
References Additional
Number Title Date Information
1-56592-427-4 UNIX in a Nutshell, A 01 Aug 1999 Textbook by
Desktop Quick Reference Arnold Robbins
for SVR4 and Solaris 7, 3rd
Editions
Student Study
Assignments

Instructor
1. Instructors presenting the Information Systems Operator/Analyst Course, 113-
Requirements
25B1O, should meet the requirements as provided in AR 614-200, TR 350-70, and DA
Pam 611-21. Specifically, instructors should:

a. Be MOSQ (fully qualified in MOS 25B) with SQI H.


b. Have successfully completed the Total Army Instructor Training Course (TAITC).
c. Meet standards of grade (SSG or above) in accordance with DA Pam 611-21, table
11-1. A proponent waiver must be obtained for SGTs serving as instructors/trainers for
this course. Waiver requests must be submitted to:

Commander
USASC&FG, ATTN: ATZH-DTQ
Fort Gordon, Georgia 30905

d. Meet body composition standards of AR 600-9.


e. Meet APFT standards of AR 350-41 and FM 21-20.
f. Not possess a physical profile that prohibits instructor duties.
g. Be thoroughly familiar with the format of TSPs, POIs, CMPs, and lesson plans in
order to effectively follow course documentation.

2. Additionally, it is recommended that instructors possess industry or military


certifications as required for introduced hardware and software applications.

Additional Stu
Support Name Ratio Qty Man Hours
Personnel None
Requirements
Equipment Id Stu Inst
Required Name Ratio r Spt Qty Ex
Rati p
o
for Instruction 113-0237 1:16 No 1 No
HUB, 24 Port
113-0423 1:1 1:4 No 0 No
Solaris Intel/Platform Release 10 (Intel)
6730-00-753-5235 1:4 No 0 No
SCREEN, PROJECTOR, MDL BM-23A 96X96
701000T025678 1:4 No 0 Ye
PROJECTOR, DESKTOP MDL s
7025-01-248-4317 1:1 1:1 No 2 No
COMPUTER DESKTOP
CABLE - NETWORK 1:1 1:1 No 2 Ye
10BASET NETWORK CABLES WITH RJ-45 s
CONNECTORS (Straight-through)
CABLE- CAT5 1:1 1:4 No 2 No
CAT 5 CABLES WITH RJ45 CONNECTORS
ETHERNET HUB No 1 No
HUB, ETHERNET
UNIX-SERVER 1:16 1:4 No 0 No
Server, UNIX , 20Gb HD, 256k Ram W/Monitor,
10/100 LAN Card
WHITEBOARD 1:4 No 0 No
Industry Standard Whiteboard
* Before Id indicates a TADSS

Materials Instructor Materials:


Required

Student Materials:

AUTOMATION-AIDED INSTRUCTIONAL BUILDING 1300SF, 20 PN


Classroom,
Training Area,
and Range
Requirements

Ammunition Stu Instr Spt


Requirements Id Name Exp Ratio Ratio Qty
None
Instructional NOTE: Before presenting this lesson, instructors must thoroughly prepare by studying
Guidance this lesson and identified reference material.
Instructors/trainers serve as role models. They are directly in contact with the students
and represent the command in the presentation of the instruction. Instructors must be
technically competent and professional in demeanor. Each instructor must:

a. Thoroughly explain lesson criteria and requirements to students. Students


should also understand the need for their constructive criticism concerning the
efficiency and effectiveness of the training and training materials. Critique
sheets will be included in the course material.
b. Thoroughly study and be well versed in the training material prior to presenting
the lessons.
c. Periodically verify course content and incorporate the latest changes into
training.

NOTE: Although selected multimedia segments designed for training assistance may
be provided on Blackboard, qualified instructors are required to conduct this course
training in accordance with the proponent approved training materials. Use of any
multimedia training segments provided in Blackboard does not preclude nor exempt
instruction or presentation responsibilities of instructors.

3
d. Manage the training and maintain an environment conducive to student
learning.
e. Supervise and guide the learning process.
f. Provide immediate feedback on student performance.
g. Be alert to students having difficulty and intercede as appropriate.
h. Counsel students and provide appropriate remedial training.
i. Maintain training records as applicable.
j. Continuously evaluate course effectiveness and efficiency, and provide
appropriate feedback to the training/TD (task) proponent.
k. Ensure students comply with safety and environmental protection rules,
regulations, laws, and course requirements.

NOTE: Inform the students that the terminology contained in the document does
not exactly represent the current terms/functions with how the Army is operating
today. Many terms (not the mission/tasks) have changed within the last year or
two; however, the manuals are the latest we have in the system. If appropriate,
ask if there is anyone in class who has the insight on the current
terms/procedures? If so, have them interject their knowledge as to assist with
keeping the information current and relevant. The Signal Center will update the
references/material as soon as the doctrine becomes available.

Proponent Name Rank Position Date


Lesson Plan
WILLIAMS, DAVID GG-13 FD Officer
Approvals

FRIEND, BEVERLY, Ph.D. YC-03 Academic Dean 01 May 2009


SECTION II. INTRODUCTION

Method of Instruction: Conference / Discussion


Instructor to Student Ratio is: 1:16
Time of Instruction: 10 mins
Media: Large Group Instruction

Motivator
In the previous lesson, you received an introduction to the UNIX Operating
System. In this lesson, we will build on that foundation to create a better
understanding of the UNIX operating environment and how it functions. It is
important that you understand the concepts and methods covered in this block.
Just as your introduction to UNIX is a building block for this class, this class will
provide a strong foundation for future UNIX instruction. We will cover the UNIX file
structure as will as explore the makeup and structure of the UNIX commands.
Your knowledge of UNIX file structures plays a vital role in your job as System
Administrator.

Terminal
NOTE: Inform the students of the following Terminal Learning Objective
Learning
requirements.
Objective
At the completion of this lesson, you [the student] will:

Action:
Perform text and directory files actions to include: naming files,
changing and removing directories, copying and removing files, and
maneuvering throughout the UNIX file structure.

Conditions:
Given a personal computer or dumb terminal attached to a
minicomputer with UNIX operating system, the necessary files
loaded in a classroom environment. Established awareness of
Contemporary Operational Environment variables, actors, and
manifestations such as Improvised Explosive Devices (IEDs),
snipers, and the cultural practices of the indigenous population in
the region where deployed.

Standards:
Met when student has performed the presented text and directory
files actions throughout the UNIX file structure while maintaining
COE awareness.

Safety
Students will be reminded of the Army Safety Program and its relationship to their
Requirements
conduct and performance at all times. All aspects of safety will be considered, to
include equipment, electrical shock, wet floors, lifting and carrying equipment,
running up and downstairs, horseplay or anything else which could result in death

5
or injury.

Risk
Low
Assessment
Level

Environmental
NOTE: It is the responsibility of all Soldiers and DA civilians to protect the
Consideration
environment from damage.
s
There are no environmental considerations associated with this lesson.

Evaluation
A question and answer session will be administered at the conclusion of this
lesson to evaluate students' progress.

Instructional
Upon completion of this block of instruction, you will be able to describe the
Lead-In
HIERARCHICAL file structure, use file naming conventions and directions,
describe Shells, use Formatted UNIX commands, and log in and manipulate files
and directories.
SECTION III. PRESENTATION

1. Learning Step / Activity 1. File Structure


Method of Instruction: Conference / Discussion
Instructor to Student Ratio: 1:16
Time of Instruction: 1 hr
Media: Large Group Instruction

a. Hierarchical file structure

(1) The UNIX file structure is very similar to the family tree. All files are connected. This type of
structure allows you to organize files so you can easily find any particular one.
(2) One of the strengths of the UNIX file structure is its ability to adapt to different needs of the users.
This can be done by taking advantage of the structure by strategically organizing your files so
they are most convenient for you.

b. File Names:

(1) Ordinary files and directory files created in the UNIX file structure will have a file name composed
of 1 - 14 characters.
(2) There are exceptions. The directory name for root which is named for root which is named / and
is referred to by this single character. No other file can have this name.

EXAMPLE: MARCH, march, and March are three different file names.

(3) File name extension is part of the file name followed by an embedded period. Extensions are
used to make files names easily understood.

EXAMPLE: Comp.c - C Programs


Comp.o - Object Programs
Comp.t - Test Programs

c. Start-up Files:

(1) There are some files that should be included in all login directories. They are called start-up files.
They are:

a) .profile: Your directory would contain this file if your system uses the Bourne Shell
(Standard UNIX system V).
b) .login: Your directory would contain this file if you are in the C shell.

(2) The start-up files should contain information such as the following:

a) Type of terminal you’re using.


b) STTY utility to establish line kill and erase keys.

NOTE: Conduct a check on learning and summarize the learning activity.


1. How many characters can a file be composed of?
Ans: 1 - 14 characters.

2. What files should be included in all login directories?

7
Ans: .profile and .login

2. Learning Step / Activity 2. Logging On


Method of Instruction: Conference / Discussion
Instructor to Student Ratio: 1:16
Time of Instruction: 40 mins
Media: Large Group Instruction

a. Logging on the system: When you log on, the system does several things. First, it verifies by use of a
password that you are authorized to sign on the system. Then, the system will establish a SHELL for
you to work in. The system administrator determines what SHELL you receive. There are many
available, the most common are:

(1) Bourne Shell (pg. 202): This shell is commonly used for the average user. Its default prompt is
$. We will use this shell during our classes.
(2) C Shell: Is used for programmers using the C language. It’s default prompt is %.
(3) Super User Shell: Sometimes referred to as root, is a very powerful user shell. User privilege for
this shell is normally limited to the system administrator.

b. Once your Shell is established, the shell will read your profile and execute the commands to set up as
your working environment. This file is similar to the AUTOEXEC.BAT file in MS-DOS. The login
process looks like this:

9600 Login: stul

Password: (not displayed)

NOTE: Conduct a check on learning and summarize the learning activity.


1. What shell is commonly used for the average user?
Ans: Bourne shell.

3. Learning Step / Activity 3. Directories


Method of Instruction: Conference / Discussion
Instructor to Student Ratio: 1:16
Time of Instruction: 40 mins
Media: Large Group Instruction

a. Directories:

NOTE: Explain to the students the concepts of WORKING and HOME directories and the importance of
relative and ABSOLUTE path names. Inform the student you will be discussing creating, deleting, and
using HOME directories.
(1) The WORKING directory is where you are working whenever you are logged on to the system.
You will always be associated with one directory or another. The directory you are working out of
will always be your working directory. No matter whose directory you are working out of, it will
always be your working directory.
a) Accessing files: When accessing a file in a WORKING directory, you do not need a path
name; you only need a file name.
b) Whne accessing a file in any directory, you need only type in the command you wish to use to
manipulate file; then the file name.

EXAMPLE: cat fileb

NOTE: Give as many examples as you feel necessary to reinforce concepts of accessing files throughout
the file system using relative and absolute path names.

(2) Home Directories: When logged on to the UNIX operating system, you are automatically placed in
your HOME directory/WORKING directory files.

NOTE: Conduct a check on learning and summarize the learning activity.


1. What directory are you automatically placed in when you log in?
Ans: Home directory.

4. Learning Step / Activity 4. UNIX Commands Overview


Method of Instruction: Conference / Discussion
Instructor to Student Ratio: 1:16
Time of Instruction: 1 hr 30 mins
Media: Large Group Instruction

a. Formation UNIX commands: The UNIX command format is:

$ command [options] [argument1] [argument2]

(1) Commands: Generally shortened forms of the function. They must be entered in lower case.
(2) Options: Most options begin with a dash. Multiple options may be strung together. The order of
the options is generally not important.
(3) Arguments: The names of files, directories, users, or other pieces of information needed by the
command to execute.

b. Delete, interrupt, and cancel keys: The key sequences to perform these functions may vary from
keyboard to keyboard. On an operational computer (PC), deleting a character could be <Ctrl-h> or
backspace (BS); to interrupt a process or cancel a command line use <Ctrl-Backspace>. Other
terminals may use <Ctrl-c> break or Del for process interrupts and @ for canceling command lines.

c. Password (passwd) utility (pg. 130): Changes log in password. New password must differ by at least
three characters. The system will prompt for old password to verify who you are.

d. ls (pg114): The ls command displays information about the contents of a directory including
descriptive information about the contents if desired. Wild cards similar to wild cards in MS-DOS can
be used with this command.

(1) * for any number of characters


(2) ? for any character
(3) [] a range or list of characters

e. cd (pg25): The cd command is used to change your location in the directory structure. The new

9
directory becomes your current directory.

f. cat, more, and page (pgs. 23, 122, 130): Each of these commands print the contents of files on the
terminal.

(1) cat: The cat command will display one or more joined files, beginning with the file specified in the
first argument.
(2) more: The more command prints the file one screen at a time.
(3) page: The page command prints the file one screen at a time in a backward or forward direction.

g. who (pg. 192): The who command will display the names of all users presently logged on the
system. The display will include each user’s terminal number and log in time.

h. mkdir (pg. 121): The mkdir command is used to create a directory or a series of directories.

i. rmdir (pg. 146): The rmdir command is used to remove an empty directory or directories.

j. cp (pg. 34): The cp command copies a file from one location to another or from one file name to
another name.

k. mv (pg. 123): The mv command moves a file from one directory location to another. Note: existing
files will be over written.

l. rm (pg. 146): The rm command removes a file from the specified directory.

m. date (pg. 43-45): The date command is used to check or change the date and time on the system.

NOTE: Conduct a check on learning and summarize the learning activity.


1. What command will display the names of all users presently logged on the sytem?
Ans: The who command.

2. What three commands print the contents of files on the terminal?


Ans: cat, more, and page.

5. Learning Step / Activity 5. File Structure and Operating Conventions, PE Part (1)
Method of Instruction: Practical Exercise (Hands-on)
Instructor to Student Ratio: 1:6
Time of Instruction: 2 hrs 25 mins
Media: Large Group Instruction

Instructor will now administer Practical Exercise (PE), Unix PE1, UNIX File Structure and
Operating Conventions, Part (1). This PE is located in Appendix C of this lesson plan.

6. Learning Step / Activity 6. File Structure and Operating Conventions, PE Part (2)
Method of Instruction: Practical Exercise (Hands-on)
Instructor to Student Ratio: 1:6
Time of Instruction: 2 hrs 25 mins
Media: Large Group Instruction

Instructor will now administer Practical Exercise (PE), Unix PE2, UNIX File Structure and
Operating Conventions, Part (2). This PE is located in Appendix C of this lesson plan.

11
SECTION IV. SUMMARY

Method of Instruction: Conference / Discussion


Instructor to Student Ratio is: 1:16
Time of Instruction: 10 mins
Media: Large Group Instruction

Check on
Determine if the students have learned the material presented by soliciting student
Learning
questions and explanations. Ask the students questions and correct
misunderstandings.

Review /
In this block of instruction, we have described the HIERARCHIAL file structure, file
Summarize
naming conventions, and directories in UNIX. In addition you have learned the
Lesson
different UNIX Shells available, the correct format for UNIX commands, log-in
procedures, and how to effectively manipulate files and directories. These skills
are critical in performing duties as a UNIX system administrator or User. The next
lesson will be UNIX Commands and Utilities.
SECTION V. STUDENT EVALUATION

Testing NOTE: Describe how the student must demonstrate accomplishment of the TLO.
Requirements Refer student to the Student Evaluation Plan.

There will not be an exam administered at the conclusion of this lesson.

Feedback NOTE: Feedback is essential to effective learning. Schedule and provide


Requirements feedback on the evaluation and any information to help answer students' questions
about the test. Provide remedial training as needed.

13
Appendix A - Viewgraph Masters (N/A)
Appendix B - Test(s) and Test Solution(s) (N/A)

B-
1
5
Appendix C - Practical Exercises and Solutions

PRACTICAL EXERCISE(S)/SOLUTION(S) FOR LESSON 1: 25B10I02 version ADT1

PRACTICAL EXERCISE SHEET UNIX PE1

Title UNIX File Structure and Operating Conventions, Part (1)


25B10I02 version ADT1 / UNIX File Structure and Operating Conventions
Lesson
Number / Title
During this Practical Exercise you will demonstrate the use and understanding of
Introduction
the UNIX File System and the UNIX basic command set. You have received the
information needed to be knowledgeable in the use of the UNIX Operating System
and proficient in accomplishing this practical exercise to standard.

In order to understand the UNIX Operating System (OS) it is necessary for an


Motivator
individual to familiarize him/herself with the basic UNIX File Structure and
Operating Conventions. The UNIX File System gives the user the understanding
of the UNIX structure and it Operating Environment. In the previous block of
instruction, we discussed the basic commands, the file structure, and the login
procedures. We will now reinforce those concepts by conducting this Practical
Exercise (PE).

Learning NOTE: The instructor should inform the students of the following Learning
Step/Activity Step/Activity requirements. (TLO Step 5)
At the completion of this lesson, you [the student] will:

Action: File Structure and Operating Conventions, PE Part (1)

Students will be reminded of the Army Safety Program and its relationship to their
Safety
Requirements conduct and performance at all times. All aspects of safety will be considered:
equipment, electrical shock, wet floors, lifting and carrying equipment, running up
and downstairs, horseplay or anything else which could result in death or injury.

Low
Risk
Assessment
There are no environmental considerations for this practical exercise.
Environmental
Consideration
s
An After Action Review (AAR) session will be conducted at the conclusion of this
Evaluation
practical exercise to evaluate students' progress and understanding of this
exercise.

Upon completion of this PE, you will be able to use file naming conventions and
Instructional
Lead-In directions, format UNIX commands, and log in and manipulate files and directories.

Resource Instructor Materials:


Requirements
UNIX02-LP1 Lesson Plan

Student Materials:
1. Computer with Telnet capabilities

2. UNIX02-LP1/ UNIX PE1, UNIX File Structure and Operating Conventions, Part
(1)

3. UNIX in a Nutshell Book

4. Optional Notes taken during the class


5. Pencil/Pen and Paper.

Instructions to Students: Please read the following instructions to the


Special
students before beginning this Practical Exercise.
Instructions

1. The objective of this PE is to gain practical experience using the UNIX basic
commands discussed in the UNIX book.
2. You will be given one hour to complete this PE.
3. This is an individual exercise and each student will do his or her own work.
4. Do not start the PE until instructed to do so.
5. You will be allowed to use your notes and the UNIX in a Nutshell book to assist
in the completion of this PE.
6. When in doubt, ASK QUESTIONS OF THE INSTRUCTOR!!!!
7. Do not write or mark on the PE Booklet pages.
8. The PE will be reviewed in class by the instructor to clear up any questions the
students may have.

Procedures
UNIX File Structure and Operating Conventions, Part 1

1. Login to your UNIX account.

2. Execute the Script File called loadpe1 to load files into your home directory.

3. Display a long listing of your home directory and look at the files that are currently in your directory,
Become familiar with the information provided in a long listing.

4. Change directory to the temp directory and identify the files that are in this directory.

5. Check to verify your present working directory.

6. Make your home directory your present working directory.

7. Check to see the number of users currently logged onto the system.

8. Display the system’s date and time.

9. Make a directory called class and student.

C-
17
10. Display a recursive list of subdirectories as well as the current directory.

11. Check to see what users are logged on and check whether the terminals are writable (+), not writable
(-) or unknown (?).

12. Display the virus1 file and read about the Monkey virus.

13. Check to see what users are logged on and print the headings at the top.

14. Display the virus1 file 8 lines at a time.

15. Display a listing of all files in your home directory to include the hidden files.

16. Print the username of the invoking user.

17. Remove the temp directory using a single command line.

18. Display the inodes for each file in your home directory.

19. Display the virus2 file beginning with line 5.

20. Check and see what users are logged onto the system.

21. Remove the student directory.

22. Make a directory called names in the student directory.

23. Display the terminal usage (idle time) using the who command.

24. Use the mkdir, cp, and mv commands to create a directory structure in your home directory that
looks like Chart 1 on the following page.

THIS CONCLUDES THIS PRACTICAL EXERCISE. DO NOT CONTINUE ON. WAIT FOR FURTHER
INSTRUCTIONS FROM THE INSTRUCTOR.
Feedback 1. Monitor students' progress.
Requirements
2. Assess the students' comprehension of the administrative procedures.

3. Answer students' questions.

C-
19
SOLUTION FOR
PRACTICAL EXERCISE SHEET UNIX PE1

UNIX File Structure and Operating Conventions, Part 1


Instructor Solution Sheet

1. Login to your UNIX account.

2. Execute the Script File called loadpe1 to load files into your home directory.
loadpe1

3. Display a long listing of your home directory and look at the files that are currently in your directory
and become familiar with the information provided in a long listing.
ls -l

4. Change directory to the temp directory and identify the files that are in this directory.
cd temp; ls -l

5. Check to verify your present working directory.


pwd

6. Make your home directory your present working directory.


cd; pwd

7. Check to see the number of users currently logged onto the system.
who -q

8. Display the system’s date and time.


date

9. Make a directory called class and student.


mkdir class student

10. Display a recursive list of subdirectories as well as the current directory.


ls -lR

11. Check to see what users are logged on and check whether the terminals are writable (+), not
writable (-) or unknown (?).
who -T

12. Display the virus1 file and read about the Monkey virus.
1. cat virus1
2. more virus1
3. page virus1

13. Check to see what users are logged on and print the headings at the top.
who -H

14. Display the virus1 file 8 lines at a time.


1. more -8 virus1
2. page -8 virus1

15. Display a listing of all files in your home directory to include the hidden files.
ls -a
16. Print the username of the invoking user.
who am i

17. Remove the temp directory using a single command line.


rm -ir

18. Display the inodes for each file in your home directory.
ls -i

19. Display the virus2 file beginning with line 5.


more +5 virus2

20. Check and see what users are logged onto the system.
who

21. Remove the student directory.


rmdir student

22. Make a directory called names in the student directory.


mkdir student/names

23. Display the terminal usage (idle time) using the who command.
who -u

24. Use the mkdir, cp, and mv commands to create a directory structure in your home directory that
looks like the Chart 1 on the following page.
1.

THIS CONCLUDES THIS PRACTICAL EXERCISE. DO NOT CONTINUE ON. WAIT FOR FURTHER
INSTRUCTIONS FROM THE INSTRUCTOR.

PRACTICAL EXERCISE SHEET UNIX PE2

UNIX File Structure and Operating Conventions, Part (2)


Title
25B10I02 version ADT1 / UNIX File Structure and Operating Conventions
Lesson
Number / Title
During this Practical Exercise you will further your knowledge of the use and
Introduction
understanding of the UNIX File System and the UNIX basic command set. To
accomplish this, you must complete the following practical exercise to standard.

In order to understand the UNIX Operating System (OS) it is necessary for an


Motivator
individual to familiarize him/herself with the basic UNIX File Structure and
Operating Conventions. The UNIX File System gives the user the understanding
of the UNIX structure and its Operating Environment. In the previous practical
exercise, you conducted basic commands to maneuver throughout the UNIX file
structure, and utilized login procedures. We will reinforce those concepts by
conducting this Practical Exercise (PE).

Learning NOTE: The instructor should inform the students of the following Learning
Step/Activity Step/Activity requirements. (TLO Step 6)

C-
21
At the completion of this lesson, you [the student] will:

Action: File Structure and Operating Conventions, PE Part (2)

Students will be reminded of the Army Safety Program and its relationship to their
Safety
Requirements conduct and performance at all times. All aspects of safety will be considered:
equipment, electrical shock, wet floors, lifting and carrying equipment, running up
and downstairs, horseplay or anything else which could result in death or injury.

Low
Risk
Assessment
There are no environmental considerations for this practical exercise.
Environmental
Consideration
s
An After Action Review (AAR) session will be conducted at the conclusion of this
Evaluation
practical exercise to evaluate students' progress and understanding of this
exercise.

Upon completion of this PE, you will be able to use file naming conventions and
Instructional
Lead-In directions, format UNIX commands, and log in and manipulate files and directories.

Resource Instructor Materials:


Requirements
UNIX02-LP1 Lesson Plan

Student Materials:
1. Computer with Telnet capabilities.

2. UNIX02-LP1/ UNIX PE1, UNIX File Structure and Operating Conventions, Part
(1).
3. Pencil/Pen and Paper.

Instructions to the Student: Please read the following instructions to the


Special
student.
Instructions

1. The objective of this PE is to gain practical experience using the UNIX basic
commands discussed in the UNIX book.
2. You will be given one hour to complete this PE.
3. This is an individual exercise and each student will do his or her own work.
4. Do not start the PE until instructed to do so.
5. You will not be allowed to use your notes and the UNIX in a Nutshell book
to assist in the completion of this PE.
6. When in doubt, ASK QUESTIONS OF THE INSTRUCTOR!!!!
7. Do not write or mark on the PE Booklet pages.
8. The PE will be reviewed in class by the instructor to clear up any questions the
students may have.
Procedures

C-
23
UNIX File Structure and Operating Conventions, Part 2

1. Make a directory called PE1.Part2.

2. Copy the contents of the virus1 file to the numbers file using the option prompting for confirmation
before overwriting an existing file.

3. Display the contents of your student directory to your terminal.

4. Display your current login id.

5. Display and verify your present working directory.

6. Issue the command that displays the number of users logged into the system.

7. Display the names of all users currently logged on the system and display the heading at the top.

8. Create a directory called sweets and move the contents of the desserts directory to the sweets
directory.

9. Issue the command to obtain the current date and time on the system.

10. Show me a long listing of your sweets directory to include hidden files and listing the inode for each
file.

11. Display the virus2 file starting with line 5.

12. Display the virus1 file.

13. Display the virus2 file 8 lines at a time.

14. Display the information on the state of the terminal.

15. Recursively copy the recipes directory, its files and its subdirectories to the sweets directory.

16. Show me a recursive listing of question #15 above.

17. Using the command rmdir, remove the sweets directory. Did it work? If not, why not?

18. Remove the recipes directory using the command with the options to remove the directory,
subdirectories, and files interactively asking your permission before removing.

THIS CONCLUDES THIS PRACTICAL EXERCISE. DO NOT CONTINUE ON. WAIT FOR FURTHER
INSTRUCTIONS FROM THE INSTRUCTOR.
Feedback 1. Monitor students' progress.
Requirements
2. Assess the students' comprehension of the administrative procedures.

3. Answer students' questions.

C-
25
SOLUTION FOR
PRACTICAL EXERCISE SHEET UNIX PE2

UNIX File Structure and Operating Conventions, Part 2


Instructor Solution Sheet

1. Make a directory called PE1.Part2.


mkdir PE1.Part2

2. Copy the contents of the virus1 file to the numbers file using the option prompting for confirmation
before overwriting an existing file.
cp -i virus1 numbers

3. Display the contents of your student directory to your terminal.


cat student

4. Display your current login id.


who am i

5. Display and verify your present working directory.


pwd

6. Issue the command that displays the number of users logged into the system.
who -q

7. Display the names of all users currently logged on the system and display the heading at the top.
who -H

8. Create a directory called sweets and move the contents of the desserts directory to the sweets
directory.
mkdir sweets; mv recipes/desserts/* sweets

9. Issue the command to obtain the current date and time on the system.
date

10. Show me a long listing of your sweets directory to include hidden files and listing the inode for each
file.
ls -lai sweets

11. Display the virus2 file starting with line 5.


1. page +5 virus2
2. more +5 virus2

12. Display the virus1 file.


cat virus1

13. Display the virus2 file 8 lines at a time.


1. page -8 virus2
2. more -8 virus2

14. Display the information on the state of the terminal.


who -T
15. Recursively copy the recipes directory, its files and its subdirectories to the sweets directory.
cp -r recipes sweets

16. Show me a recursive listing of question #15 above.


ls -lR sweets

17. Using the command rmdir, remove the sweets directory. Did it work? If not, why not?
rmdir sweets; no; has something in it.

18. Remove the recipes directory using the command with the options to remove the directory,
subdirectories, and files interactively asking your permission before removing.
rm -ir recipes

THIS CONCLUDES THIS PRACTICAL EXERCISE. DO NOT CONTINUE ON. WAIT FOR FURTHER
INSTRUCTIONS FROM THE INSTRUCTOR.

C-
27
Appendix D - Student Handouts (N/A)

Вам также может понравиться