Exersice 3 - UNIX and e-mail

On following exersices you can make use of handout´s paragraph Use basics of Unix-operating system.

  1. Log in to computer with your user identification. Start Secure Shell SSH from desk. By choosing File|Connect login window emerges and it can be used to log into e-mail server. Write server´s name to the point Host Name. Server´s name is kanto.cc.jyu.fi if you have user identification in cc-server. And the server´s name is verso.st.jyu.fi if you have user identification in st-server. Put your user identification to the point User name and your password to the point Password.
  2. If you haven´t changed your original password change it now with command passwd! The system asks your old password and then new password twice.
  3. You are automatically in your home directory after log in. Check directory listing by using command ls -al and check also which directories and files you´ll find from your home directory. Try also if the command dir works on your computer. If it works alias dir has been done of command ls. There are DOS-substitutes for most of the commands in ADP-centrum´s UNIX-computers.
  4. Produce a subdirectory lahetys to your home-directory by using command mkdir.
  5. Go to the produced directory with command cd and produce a file called nimi.txt by using pico-editor (pico nimi.txt). Write your name to the file. When pico is on you´ll see the most common commands at the bottom of the screen. ^ -mark means that you have to press ctrl-button and the character next to it at the same time. For examble saving files can be done by pressing ctrl-button and then o-character at the same time.
    ^G Get Help  ^O WriteOut  ^R Read File ^Y Prev Pg   ^K Cut Text  ^C Cur Pos   
    ^X Exit      ^J Justify   ^W Where is  ^V Next Pg   ^U UnCut Text^T To Spell  
    
  6. Produce also a file called osoite.txt and write your address to the file.
  7. Go back to your home-directory.
  8. Produce a new directory called temp to your home-directory.
  9. Your directory structure should look like the following when you check it from your home-directory level.
    .
    |-- lahetys
    |   |-- nimi.txt
    |   `-- osoite.txt
    |-- temp  
    
    You can try tree-command to find see the listing of your directory structure. The command tree may not work on all computers.
  10. Use the absolute reference and copy the file nimi.txt from the directory lahetys to the directory temp with the command cp.

    absolute reference (an examble)

    You have following directory structure right under the home-directory:
    .
    |-- norja
    |   `-- oslo
    |-- ruotsi
    |   `-- tukholma
    `-- suomi
        |-- helsinki
        `-- jyvaskyla
            `-- agora.txt
    
    There is told the location of file or directory from since the root of home-directory in absolute reference. The root of home-directory is marked with ~ -symbol. If you now want to copy agora.txt to below the oslo-directory it can be done by writing
    cp ~/suomi/jyvaskyla/agora.txt ~/norja/oslo/.
  11. Move the osoite.txt -file to same directory with command mv by using relative reference.

    relative reference (an examble)

    You have following directory structure right under the home-directory:
    .
    |-- norja
    |   `-- oslo
            `-- agora.txt
    |-- ruotsi
    |   `-- tukholma
    `-- suomi
        |-- helsinki
        `-- jyvaskyla
            `-- agora.txt
    
    There is told the location of file or directory from since the default-directory in relative reference. The default- directory is the one where you are in when you write commands. So it is the directory where you have moved to with cd -command. If you now want to move the agora.txt-file from oslo -directory to the tukholma-directory and the default-directory is suomi you should write:
    mv ../norja/oslo/agora.txt ../ruotsi/tukholma/
    The marking .. backs up one level in the directory structure.
  12. Check the directory listing from lahetys-directory with ls-command. Check also the content of temp- directory. Try to take directory listing from temp-directory by using both absolute and relative reference.
  13. Go to the temp-directory and merge nimi.txt and osoite.txt with pico-editor. Name the new file mina.txt. You can put one document inside the other document in pico-editor with CTRL-R button combination.
  14. Delete temp-directory and all it´s contents. At first you must delete files and then the directory can be deleted. (rm and rmdir).
  15. Go to lahetys-directory and look what kind of authorizations are defined to directory and to it´s contents (ls -al). Change the authorizations so that you give read-authorization to all with chmod- command. Read the instructions of chmod on page 58 and 59.9 from the manage guide of information technology. Be careful that you give read-authorization only for correct directory. Try with your neighbour if can you gain access to each others directories. This can be done in the following way: cd ~user identification/lahetys/. The user identification is your neighbour´s user identification.
  16. Try to copy file mina.txt from your friend´s lahetys -directory to file called kaveri.txt in your own lahetys-directory.

E-mail

  1. Produce a new file called lisaliite.txt to lahetys- directory. Write few paragraphs of text on the file.
  2. Start e-mail program Pine. You can read the things included to sending a message from the book if needed and after that you can send an e-mail message to yourself. Your e-mail address format is user identification@st.jyu.fi if you have user identification on itu, verso, silmu or oras e-mail server. Your e-mail address format is user identification@cc.jyu.fi if you have user identification on kanto, tukki or oksa e-mail server. Give a title for your message by writing it to subject-field and write to ordinary message-field some text. Send the message with Ctrl-X and accept send procedure by pressing character Y. It takes a while before message arrives so move to following task.
      PINE 4.21   COMPOSE MESSAGE                      Folder: INBOX  5 Messages   
    
    To      : tjlahton@st.jyu.fi
    Cc      : 
    Attchmnt: 
    Subject : test
    ----- Message Text -----
    
    testing testing :)
    
  3. Send a new message to yourself which includes files made earlier by you. Paste the contents of nimi.txt with in your message´s text field with Ctrl-R. After that you can browse files of your home-directory with Ctrl-T. With arrow- and Enter-buttons you can go to lahetys -directory and there you can select file to be added. Selected file will be located automatically to point where the cursor was before selecting the file.
  4. Paste another one file within your message. Go to point Attchmnt. With Ctrl-J button command you can paste a file as an attachment to your mail and after that you can select the file lisaliite.txt by pressing button combination Ctrl-T as it is done in previous task point. After selecting file to be attached give more information about your attachment to the recipient. And after that you can send the message to yourself.
      PINE 4.21   COMPOSE MESSAGE                      Folder: INBOX  5 Messages   
    
    To      : tjlahton@st.jyu.fi
    Cc      : 
    Attchmnt: 1. /st/95/kauris/tjlahton/lahetys/lisaliite.txt 
    Subject : liitelahetys
    ----- Message Text -----
    
    Tommi Lahtonen
    
  5. Receiving messages may take a while so go and add some person´s e-mail address to your address-book. If you don´t have any addresses add your exertutor´s e-mail address to it. The address should be on blackboard of the class.
  6. You should have received messages by now so go on and read them. If you don´t have received messages press CTRL-L combination. Pine will now check incoming messages. Go to message where is the attachment lisaliite.txt. Save attachment to your home-directory. With button V you can start saving. After that use arrows and go to right point and press button S. Now you should find the file from your own home-directory. You can check if the file exists when you have stop working with Pine.
  7. Use Netscape-browser and go to following address <URL:http://www.jyu.fi/webmail/>. There is e-mail program named IMHO WebMail on the address. Read the instructions from the front page and after that go and read your messages.
  8. Create a file with Notepad and copy WebMail´s address (URL) on it by using clipboard. Save created file with name liite.txt to the directory named with your own name below the C:\Mytemp\- directory.
  9. You can start program by using that link where the last part of your e-mail address is mentioned. After that write your user identification to the point Login and password to the point Password. New messages can be written with New Mail on WebMail. Write recipient´s address to the field To. Send the file produced by you to yourself. You can add an attachment with in message with button Add Attachment. After that select from emerged window Browse-button. By using that the attachment can be found from your computer´s hard disk. After selecting file the attachment can be added by choosing Upload to attachments. Sending message can be done with Send-button. New mails can be checked with Check for new mail-button. Try to read your mail and the attachment file within WebMail.
  10. Go to Pine and wait the incoming e-mail. By pressing CTRL-L Pine checks incoming messages immediately. Save the attachment you received to lahetys-subdirectory which is below your home-directory.

http://appro.mit.jyu.fi /2000/syksy/propedeuttinen/demot/demo3/index.html
© Petri Heinonen ()<URL: http://www.mit.jyu.fi/peheinon/>
7.09.2000 14:38:30