CIS118 Intro to LINUX Name______

Quiz #2

1. What’s the difference between using “>” and “>>” in redirection? What happens to a existing if you use “>” to redirect to it? What happens to a existing file if you use “>>” to redirect to it? What happens if you “>>” to a file that doesn’t exist?

2. the to create the directory CIS118 in your HOME directory, regardless of where the HOME directory is or where you are in the directory structure. (Hint: use the ).

3. Write the command to allow only the owner to have read and write access to a file called “security.breaks” using the “numeric method”.

4. Write the command to send your home directory long listing to a file called “dir.list”; regardless of where you are in the LINUX directory. Write the command to send the first 10 items in a long list of the “root” directory to a file called short.dir.

5. Write the command to copy file /etc/profile from root to your HOME directory regardless of where your HOME directory is located.

6. Describe the difference between the commands “ “whereis” and “locate” as applied to the file called “whereis”. Show an example of each. What is the equivalent “” command or this function for the file named “whereis”

7. Write the command to copy the file FILE2.txt to FILE2.old. Write the command to rename FILE2.old to FILE2. What happens? Why? Write the command to erase the file FILE2.old.

8. What is is the difference between files “file1” and “file2” when created by the commands “ file1” and “ ‘’ > file2” as indicated by the difference between a long listing of the two files.

9. In LINUX/ everything is a ______or a ______.

10. True/False: the command “ ./dir1/file1 ./dir2” creates a new file on the hardrive. I know this because this command shows me ______.