UNIX EXERCISES - C3 1999 MAX POINTS 0x1000004 ***************************************************************** written by Boris Lutz & Arie Gerszt I- 1. go to your home directory and create a dir with the name unixtest 2. create a file within this directory with the name myfile 3. set the permissions of this file to user : read, write group: read other: none use the method with letters (u,g,o) 4. copy this file to /tmp 5. delete the file in the unixtest dir 6. create a new directory in your home dir with the name mydir 7. move the file /tmp/myfile to your new created directory called mydir in your home dir and name the file mynewfile 8. set permissons of the file to the following user : read, write group: none other: none use the method with numbers (4[r]+2[w]+1[x]) 9. clean up: delete the file 'mynewfile' and the created directory called 'mydir', 'unixtest' so you will find your home dir in the original configuration. 10.FIRST PART COMPLETED ... ***************************************************************** II- 1. create a dir in your homedir called mydir and within a file with the name myfile, use touch to create the file. 2. edit this file with vi. type the following text into it: 'this is my file created with vi for the UNIX exercise'. hint: you will find vi commands in your command reference which has been distributed. 3. fill in further 3 line in the file using the insert command. save the file and quit. 4. restart vi and load your 'myfile' file. delete the first line completely using the dd command. 5. save the file, quit vi and start emacs, load your file into the buffer. 6. write your firstname, surname, date of birth into the file and save it. 7. quit emacs. type 'more myfile | mail blutz' and press return 8. SECOND PART COMPLETED ... ***************************************************************** III- 1. create a file which contains your firstname, use an editor of your choice and type your hostname (the asm?? number) into it, write down your name at the end of the file. save the file and quit the editor. 2. start ftp from the command line. the command is 'ftp' open a connection to 'stsf.trevano.ch' (don't write the quotes!) login with your username and password. hint: use ? to get help with the ftp client. load the file up to the server and quit the session with the ftp client. 3. start telnet from command prompt. login to the host 'stsf' for help with telnet consult the command reference or man pages. login with your user and password. after login change to your home dir, find your file and delete it. Log out from stsf ***************************************************************** IV- 1. start xclock from the command line and bring it to background. this can be achieved using the & on start up off the program or by suspending it (CTRL-Z) and typing 'bg' 2. open up a second terminal session, telnet into your machine. 'telnet asm??' and login with your username, password. Find the appropiate PID (process id) with ps of xclock. Kill this process. 3. close the new terminal box. ... has xclock disappeared? If not check what you have done wrong ... try again. ***************************************************************** V- ... you are becoming a power user ... so a last challenging experiment ... So finally go to your home directory. Use the the way with the tilde (~). Create a tar archive of your homedirectory, and load this up to stsf.trevano.ch via ftp as learned before. The archive should be named corresponding to your first name. Log out of the ftp and inform one of the assistants that you have completed your task. ****** C O N G R A T U L A T I O N S ******