Assign 0: UNIX Warm up
Goals for Assignment 0
After the assignment, you should
- Know how to use the
scriptandtouchcommands. - Learn two new commands and how to use them
Objective: Basic UNIX Review/Practice (20 pts)
If you haven't already, create a cs397
directory and a assignments subdirectory.
Create an assign0 subdirectory
within assignments.
Save the following commands and their output in a script file called
practice.out by executing the following
command:
script practice.out
Do the following tasks:
- Copy the files from
/csdept/courses/cs397/handouts/assign0into yourassign0directory. - Look at the contents of your
assign0. - Execute
example.shby executing bash example.sh - Move
last_names.txtinto the parent directory. - Create a file within your directory, named by your username, using
the
touchcommand. In another terminal (so that it doesn't show up in your output script), use themancommand to learn what thetouchcommand does. - View the contents of your directory.
- Type exit to stop saving the output to the file.
View your practice.out file to make sure
that you recorded all the above commands.
Objective: Exploring New UNIX Commands (25 pts)
In another browser tab, go to Wikipedia's List of Unix Commands
Pick out two utilities that you haven't seen before or want to know more about. (Do not choose a utility from the SCCS category because we don't have those installed. There are some others that we don't have on our machines too.)
In a text file (composed in jEdit or Emacs or other text editor), summarize the two commands you learned, their most useful options, and an example of when you would want to use these commands.
Try out the commands, saved in a script file, e.g.,
new_commands.out, as you did above.
Finishing up: What to turn in for this assignment
Copy your directory assign0 and its
contents into your turnin directory.
Verify that your assign0 directory does
not contain lastnames.txt but does contain example.sh,
two output files from the script command, and your explanation of the
commands.
The electronic version should be in
the turnin directory before the next
class.
Grading (45 pts)
- 20 pts: Execute commands, evidenced by script file; correct permissions on files
- 25 pts: Exploration/explanation of new commands; script using new commands.