Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
UNIX Systems Programming
Assignment
Description
This assignment is an individual programming assignment using Python. It addresses objectives 2
and 3 as listed in the Subject Outline document.
No limits apply to the number of lines of code of the program.
Assignments are to be completed individually (this might be checked with the use of anti‐
plagiarism tools such as Turnitin). You should not receive help in the preparation of this
assignment, nor ask anyone else to prepare it on your behalf in any way.
Marks
The assignment corresponds to 30% of the total marks.
Submission
The completed assignment is due by 5:00pm of Friday 29 October 2021.
PLEASE PAY ATTENTION TO THE FOLLOWING SUBMISSION INSTRUCTIONS:
1. Your Python program has to be submitted on Canvas, following the “Assignments” menu
and then the “Assignment” link by the due date. You can prepare your Python program
anywhere you like, but probably the easiest option is to develop it in Ed STEM.
2. Please submit only your Python program, and nothing else (no data files).
3. Late submissions will be deducted one mark per day late; more than seven days late, the
assignment will receive zero. Special considerations for a late submission must be
arranged in advance with the Subject Coordinator.
2
Academic Standards
The assignments in this Subject should be your own original work. Any code taken from a
textbook, journal, the Internet or any other source should be acknowledged. For referencing,
please use the standard referencing conventions.
Marking Scheme
Mark Range
30 All requirements of the assignment are met. The submitted
program can be executed by the lecturer “as is” and produces the
requested output.
24‐29 The program works correctly with any valid file and for all options,
but its execution experiences some minor problems.
18‐23 The program does not work as expected with one of the options.
0‐17 This range goes from no submission at all (0 marks) to a submission
which does not meet major requirements of the assignment.
Examples:
the program does not work as expected with two or more
options;
the program generates unhandled errors;
the program does not solve the assignment problem.
The assignments will be marked within two weeks from the submission deadline or as soon as
possible.
Important notes:
Submission of this assignment is not compulsory to pass the subject; do not feel that you
have to submit it “at all costs” and perhaps be tempted to seek unauthorised assistance.
There are no minimum requirements on the marks on this assignment to pass the subject.
This assignment must be your own work and you should not be helped by anyone to prepare
it in any way; your assignment may be tested with anti‐plagiarism software that detects
superficial changes such as changing variable names, swapping lines of code and the like.
The subject coordinator may ask you to describe your assignment in a “viva voce” in Zoom to
finalise your mark.
Understanding the assignment specifications is part of the assignment itself and no further
instructions will be provided; on the other hand, whatever is not constrained you can
implement it according to your own best judgment.
3
Title: Partition information with Python
In this assignment, you will use Python for writing a program that can report information about
the partitions of a Unix system. The program will read a pseudo system file containing partition
data and will report the requested information to the user.
These are the specifications for your Python program:
1. It must be named partitionreport.py
2. It must be invoked as:
python partitionreport.py option partition_file
The program must check that argument partition_file exists, is a file and is readable. If not,
it must print a message of your choice to the standard output and exit. The specifications
for the partition_file and option arguments are given below.
3. File partition_file can have any arbitrary name (including the extension). It must be a file of
text with the following format:
a. The file consists of an arbitrary number of lines (including, possibly, zero lines).
Each line corresponds to a partition.
b. Each line must contain six fields separated by a space character.
c. The six fields are: partition, mount point, file system type, permissions, total space
and used space.
d. Fields partition and mount point are standard Unix absolute filenames.
e. Field file system type is a string (of maximum 10 characters). The characters
allowed include lowercase letters, uppercase letters, digits, the underscore (_) and
the hyphen (‐).
f. Field permissions can be either string 'rw' or string 'ro'.
g. Fields total space and used space are positive integers represented as strings of no
more than 10 digits each.