Name: Date: Exercise Linux Save this file in one of your directories. Using an editor (vi or emacs), open this file and type in your answers. Please include the questions with your responses. Email the completed exercise to larson@astro.washington.edu. Deadline: 1. (1 pt) Confirm that you have changed your password by initialing here ____ . You used what command to accomplish the change in your password? 2. (1 pt) Go to your home directory if you are not already there. If you type the command cd .. what directory are you in relatively speaking (that is, no matter where you were)? What directory are you in absolutely speaking? 3. (1 pt) How did you find out? ************************************* Now type cd in order to return to your home directory. Create a subdirectory called test. 4. (1 pt) What is the relative pathname to the test directory, from your home directory? 5. (1 pt) What is the absolute pathname to test? 6. (2 pts) Type kill bill What response do you get? Why did you get it? ************************************ In the directory test, edit a file called bill and copy the following lines exactly as shown: #### a way to kill bill #### ls -R /net/projects/ > out.txt 7, (2 pts) What are you asking the computer to do, exactly? ("Kill Bill" is not the answer!) Make the file bill executable (able to run) by typing in chmod +x bill 8. (1 pt) What is done when you use chmod? How would you change this command so that only the user could execute the file? 9. (1 pt) You are going to run bill as a background job. How would you "kill bill"? It is important to get this right since the above command sets up a very bad loop! ********************************* Now, type bill & Hit return (enter) again (you should see something about suspended) then 10. (2 pts) Go ahead and kill bill then type: jobs and write down exactly what the computer responded with: ******************************** There is a file called foo.txt in my home directory. Copy this over to your own home directory. 11. (3 pts) On what date and time was this file created in *your* directory? When was it created in my directory? How large of a file is it? (You'll need to use ls -l. The entry just to the left of the date is the file size in bytes) 12. (1 pt) What permissions do the owner, group, and others have? 13. (1 pt) Now figure out how you could generate a full listing of all the files in your home directory (even the subdirectories), and append it to the end of the file foo.txt. Take a look at the file to make sure you've accomplished this successfully. Make this happen, and write down the exact command you used (including any flags and re-direction) here: 14. (1 pt) How large is foo.txt now? 15. (2 pts) What does a pipe let you do? Write down an example that you might want to use. 16. (1 pt) Let's say you have a few files that are ridiculously huge, but that you want to keep. What command would you use to compress them? 17. (3 pts) You should have already copied over a series of files into a directory called exercise1. This directory is for IRAF use. Change to that directory, and create a tarball of those files. What command and flags did you use? Create another directory, move the tarball to that directory, and extract the files. What command did you use?