Special Extra Credit Assignment (Optional)
Due: October 21, 2019
Points: 100
The goal of this extra credit is to encourage you to try different things on Linux, to get used to that system.
It is completely optional.
- (10 points) The Linux manual has 8 sections. When you see “man(1)”, that means the manual page for the command man is in section 1 of the manual. To see what each section of the manual contains, look at the intro manual page in each section.
- What command would you give to print the manual page for the system call creat in section 2 of the manual?
- Please write a one-line description of what each section of the manual contains; for example,
Section 1: user commands
Section 2: system calls
- (10 points) What command(s) would you use to copy the file /home/bishop/hw1-programs/vis-output to your home directory and make it read-only by everyone (owner, group, world).
- (10 points) What command would you use to create a subdirectory called “test” in your home directory. With what access permissions is it created?
- (10 points) Write a command to print only the last line of the file “/etc/passwd”.
- (10 points) Show the command to make a copy of the directory /usr/bishop/hw1-programs, and everything it contains, in your home directory, with one command. Hint: Look at the -r option to the copy command cp(1).
- (10 points) When I write data into the file /dev/null, what happens to it?
- (10 points) The program ls(1) lists the contents of a directory. But it does not list any files whose names begin with “.” (period). What option would I give to ls to include those files in the output?
- (10 points) Every directory contains a subdirectory named “..”. What is that subdirectory? And what is the “..” in the root directory “/”?
- (10 points) The file /usr/share/dict/words contains a list of English words. Write a command that will put all words in that file that contain the character sequence “gry” in the file GRY.
- (10 points) How would I list all files that begin with “a” and end with “.txt”?