Due: Thursday, April 10, 2018, at 11:59pm
The purpose of this assignment is for you to become familiar with the basics
of the Linux shell and the range of commands that are included in most Linux
distributions. The intent is to help you learn about some
basic commands as well as
how to discover more on your own. This assignment will not teach you all the commands you many need to complete this course. You should use the Linux Pocket
Guide and the Linux man
command
or the online version of the Linux man pages (see the link on the course web site)
to find specific commands needed
to answer these questions, and use the Pocket Guide to read about
related commands and topics. Google is also useful for locating things, but you need to learn your way around the Guide and the standard Linux documentation, which should be your primary source.
There are two parts of the assignment. In Part I you are asked to run several commands and capture the terminal session in a script file to hand in. Part II consists of several questions to be answered in a separate file. You should turn in both files when you are done.
Use the command script hw1.part1
to start
a shell and save the input and output into a file hw1.part1
. Then
run the commands needed to answer the following questions. If you make a few small mistakes you don't need to start over, but include comments (input lines
starting with #) after non-trivial goofs so we can follow your output easily. Also don't worry about "invisible" control characters like tabs and backspaces that are captured in the script file. That is normal and not something that needs to be fixed.
It would also be helpful if you included some comments (using the '#' marker) to identify answers to the different sets of questions to make it easier for the graders to navigate through the output.
echo
command. ls
command to show the file
name and permissions.cat
command.ls
command again to show the file name and permissions.cat
.Use a text editor (emacs suggested - you should learn how to use it at some
point, even if you later use something else - although it ok to use vim instead if you insist) to create a plain text file named hw1.part2
containing
answers to the following questions:
-l
option for wc do?wc
on the directory '/etc/passwd' and copy and paste your findings.echo $HOME
' to investigate.)echo
Hello World! > hello
differ from echo
Hello World!
? echo
happy week > hello
.
Describe what this does.echo
wonderful day >> hello
.
Describe what this does.Assessment: Your solutions will be evaluated on how
well they follow the instructions
and produce the desired results in part I, and on the correctness and conciseness
of your answers in part II.
Note: Remember that we will check your solutions using CSE's CentOS Linux system.
Be sure that your answers are valid on the CSE systems (either klaatu
or the CSE home virtual machine).
Turn-in Instructions: Turn in the two files created above to the Canvas assignment HW1. The drop box will allow you to turn in your homework up to
two days late, if you choose to use one or two of your late days, but you are
strongly advised to save your
late days for later in the quarter when they are almost certain to be much more useful.