This homework assignment needs to be performed individually on the Linux boxes in the Linux Lab, not on the machines in CSB 315.
The purpose of this assignment is to introduce you to (or remind you of) Linux commands that you may use on the Linux boxes.
Some of these questions may require commands or options that were not
covered in lecture. To find out more about a command, use
To find out which manual pages mention a given topic:
man -k topic
Some of the questions may require a pipeline:
Don’t use command substitution:
You will turn in a plain text
hw1.txt, formatted thus:
1) date 2) this is where the answer for question #2 goes if question #2 needs another line, it goes here 3)
and so on
Creativity is a wonderful thing, in its place. Creative formatting will not be appreciated. Follow the format, above. Create the file however you like. I’d use an editor.
For all of these tasks, I do not want you to do the computing yourself. For example, if I ask how many files are in a given directory, I don’t want you to stare at the screen and count the files yourself, on your fingers. I want the computer to do the counting.
For these questions, I define items to be plain files, directories,
symlinks, etc. It means things in a directory, no matter their type.
The special directories
.. are not included.
/etc/hoststhat contain the letters “b”, “e”, “a”, “g”, “l”, “e”, in that order, possibly with other things between them?
/bin? Think of it in steps:
/bin. (Remember what items means.)
/bin? How many items are in
ct320? I’m not interested in the items it contains—I want the path of the home directory itself.
bindirectory inside ct320's home directory, in reverse alphabetical order? I want the command to show 43 items, none of which should be the
bashscript, using only shell variables and built-in shell constructs (no other programs such as
bc) to display the final sum of the numbers 1 through 789, inclusive. Do not use algebra to figure out the sum. Make the computer actually do all seven hundred eighty-nine additions. You must follow the recommendations in the Bash scripts lecture.
If you encounter “STACK FRAME LINK OVERFLOW”, then try this:
Use web checkin, or use Linux checkin to submit your
~ct320/bin/checkin HW1 hw1.txt