CS2211 Assignment 1




5/5 - (3 votes)

Question 1
a) An operating system is a control program for a computer which allocates the resources
of the computer which allows it to schedule tasks and provide an interface for the user
b) A kernel of an operating system is the central component which manages the processes
and resources demonstrated by controlling and hiding the hardware
c) A shell in Unix is the interface between users of and kernel, most commonly defined as a
command line interpreter (CLI)
Question 2
To make a directory, the command “mkdir” is used and followed by the name of the directory
being created on the same line.
To make a file, the command “vi” or “emacs” is used and followed by the name of the file being
created on the same line.
Question 3
a) To display permission information, display the files using the “ls -l” command and
reading the letters to the right of the “-“ (means regular file), or the “d” (means
directory), or “l” (means symlink) then each of the three groups represents the
individual, group, and other permissions respectively, showing rwx- (read, write,
execute, not present) for each group
b) To display just the permission information of dir0 and dir1 but not their contents then
go into the directory containing them and typing “ls -l” as the command
c) The result of ls* is the list of all files in the current directory, so in the asn1 directory it
shows dir0 and dir1 with their respective files in it if there is another directory in it – this
is because it is doing a wildcard search
d) The result of ls ** is the same as ls *, displaying the files in the directory and files in
contained directories as this is again, doing a wildcard search
Question 4
a) To display all the directory names recursively type “find -type d” as a command
b) To display all the files recursively that start with d, but not the directories, use “find –
type f -name “d*””
c) To display all files that have been written within the last 48 hours, use the command
“find -mtime -2” (does not show files as I started this assignment more than days before
I took this screen capture)