======================================================================= Subject: Using ph A few people asked about the part of the 2nd assignment that involves looking up the phone number of the CS department administrator by using: ph malloy (malloy being his last name). You asked whether the index_id that ph displays for him is his phone number....The answer is no. Note that when you do `ph malloy' the ph program tells you: E-mail addresses and telephone numbers are only displayed when a query matches one individual. To obtain additional information on a particular individual, inquire again with the index_id. I.e., since `malloy' matched more than one person, you get no telephone number. What the above message also tells you is that the index_id it displays for our administrator can be used to get his phone number. That is all the hints I want to give you on this problem, I leave it to you to figure out how to then get his phone number. The moral of this story is that it is important to read the output of a program carefully when things don't go as you expect; the output often gives you clues that will help you achieve your goal. These are the types of skills that will allow you to adapt to new computers and computer applications even after you have left CS101. Rob ======================================================================= Subject: Inserting foo in mail message Some of you have run into a problem inserting foo into the mail message for the homework. Here is the problem: When you type the command to insert-file you are prompted on the bottom of the screen to... Insert file: /tmp/ This means you should type in the filename. However, notice that the prompt is followed by `/tmp/'. This means that if you just type foo, it will look for the file: /tmp/foo I.e., foo in the tmp directory, but your foo is in your home directory. Recall that many programs allow you to use ~ as a shortcut for your home directory. So, you need to backspace (erase) the /tmp/ and type in the true location of foo (i.e., foo with its `path' in front of it). You can do so by using ~. (Ok, I am being purposely, slightly vague here, but I didn't want to give the whole answer away. If you still have trouble stop by and see me and I will be glad to help you.) Rob ======================================================================= Subject: Re: homework2,problem5 Someone asked: > Rob, I am trying to copy my file "foo" into my new directory. I can do that > much but I can't figure out how to rename the file. Briefly, when you tell it to copy (cp) it to a new directory you can give it a new name. For example, if I copy a file `abc' from my current directory to a subdirectory called `mysubdir', I could do: cp abc mysubdir This command will make a _copy_ of `abc' in the subdirectory mydir. The copy is also named `abc'. So the copy's relative path is: mysubdir/abc ^^^ directory relative to where I am BUT, you can also give a filename to copy to in the cp commands, so: cp abc mysubdir/def would make a copy of `abc' in `mysubdir', but with the filename `def'. Another way, is to copy `abc' to the subdirectory and then rename it using the mv command. Essentially, you use: mv oldname newname where you substitute the real filenames for `oldname' and `newname'. Class, if you need detailed help ask questions in discussion or come to my office hours. Good Luck. Rob ======================================================================= Subject: Emacs Someone asked: > After I do Ctrl-x, Ctrl-c on completion of my e-mail message, the computer > puts up a SAVE question at the bottom. Something to the effect of SAVE > FILE IN /tmp/snd....... Do I say yes, no or what? And where is my tmp > direc.? If you could just tell me I'd be really grateful. Right now I am > saying YES to the saving ques. just to be on the safe side. When you exit Emacs AND you have not saved your most recent changes to a document, Emacs asks you if you want to save them to disk. So, unless you respond `y' to this question when Emacs asks you, it will not get saved to disk. Of course, if you save your document on your own with the C-x C-s commands then Emacs will not prompt you when exiting. The /tmp directory is not in your home directory. Notice it starts with a / meaning it starts at the root (very top) of the UNIX directory tree. Rob