CTS 1106 (Intro to Unix/Linux) Homework Assignment #4
Due: by the start of class
on the date shown on the
The following questions all relate to Unix/Linux systems.
Answer as briefly (but completely) as possible, and assume I mean
only POSIX or other utilities mentioned in class:
Which are the characters that cannot be used in a
(Note many characters should not be used, but only a couple
are truly illegal.)
Can a space be used in a filename?
Logically, directories contain other files and directories.
But with Unix/Linux, directories are just simple files with data
What data does a directory file contain?
What is a safer (as in less likely to cause damage to
your system) alternative to “rm *”?
(That is, what option(s) can you use to make this safer?)
How will you find out the total disk usage of the current
directory tree (i.e., the size of the current directory
and recursively all contents)?
You have a complete directory structure (e.g., all files/directories
in your home directory, recursively) to send to someone,
possibly across the Internet.
(This means the file names and the file contents.)
Which command (that we have learned in class) is most suitable
for the task, and how might you do it?
A file contains 5,000 bytes on a filesystem that uses the standard
blocksize of 4
How many bytes of disk space would you expect this file
(Hint: It can't possibly be less than 5,000 bytes!)
How do you list the attributes (i.e., the permissions, the owner,
the size, etc.) of the current directory (and not the contents
of the directory)?
If some file doesn't have write permission for the owner,
can the owner remove it?
What should you do to make sure that no one can see the names
of the files you have in your home directory?
How can you determine whether two similar files are copies
or hard links?
What are the two main limitations of hard links?
How does an administrator ensure that all files created by
users in the future will have the default permissions
How will you count the number of files (including directories)
in your home directory tree (that is, your home directory and
recursively all sub-directories)?
What command or pipeline will extract only the login names of
the users from /etc/passwd, after ignoring the
first 10 entries?
To be turned in:
Email your homework assignment, by copy-and-paste
(no attachments please!) to
If possible use the “text” and not the
mode of your email program.
Please use the subject similar to
“Intro to Unix/Linux Homework Assignment #4 Submission”,
so I can tell which emails are submitted homework assignments.
Homework assignments will not be returned.
Please do not send as attachments.
Do not send to
Refer to the Homework and
the Submitting Assignments
sections of your syllabus for more information.
Send questions about the homework assignment to
Please use a subject similar to
“Intro to Unix/Linux Homework Assignment #4 Questions”
so I can tell which
emails are questions about assignment quiz (and not submissions).