Contents


Exercise Unix: Concepts and Tools, ssh and Emacs

  1. Secure Shell: ssh:
    1. With the program "ssh" you and open a secure shell shell on any computer on the Internet.
      Check the man and info pages of "ssh".
      What does the option "-X" do?
    2. Go the WWW page "Rechenzentrum der FHTW Berlin":
      http://www.rz.fhtw-berlin.de/technik/tech_unix.html
      You find a number of different Unix machines:
      Sun Microsystems (Unix: Solaris and SunOS)
      Silicon Graphics (SGI Unix: IRIX),
      IBM (Unix: AIX)
      and Linux.
      Choose a nice machine and login with :
      shh -X yourName@theMachineThatYouLikeBest.rz.fhtw-berlin.de
    3. Check where you are with "pwd". This is your home directory!
    4. Start an X-application like "xcalc" or "xeyes".

  2. Mount:
    1. Find out what devices are mounted on which directories on the system.
    2. What is the command to mount the first partition of the IDE secondary master hard disk with a Linux extended-3 (ext3) filesystem ?

  3. Copy and CO.:
    1. Create a file with: cat >testfile (you can type some text then finish with CTRL-d).
    2. Look at the content of "testfile".
    3. Create a sub-directory tmp under your home directory,
      then yet another sub-directory test under tmp.
    4. Copy "testfile" to ~/tmp/test , then mv the test directory up into your home,
      then cp it to the "global" /tmp directory. Go to ~/tmp and /tmp and check.
    5. Remove everything you created again.

  4. File Rights:
    1. Create again a testfile. What are the default rights ?
    2. Now modify the current rights of your file:
      ... so that only you can read or write the file.
      ... so that nobody can write the file.
      ... so that you can execute the file. You may execute it (on you own risk) !
      ... so that everybody can read or write the file.

  5. Users:
    1. Who are you ( ID, group(s) ) ?
    2. Who else is logged into the machine you are using at present ?

  6. Processes:
    1. How may processes carry you name ?
    2. Who is running the process that consumes most CPU time or most memory ?

  7. Pipes:
    How many files in the /lib directory contain the letters "r", "n", "d"
    in any combination (use ls -1 and grep(s) in a pipe-chain) ?

  8. Installation and Tools:
    1. How much disk space is left/used on your machine?
    2. What directory under your home directory is using most disk space?
    3. Search for you name in all files in you home directory and in all sub-directories.
  9. Emacs:
    1. Use Emacs to undo the transformations in the following Transformed Text and save the result:
      
      Transformations:
      
      Replaced:
      th->sei , Th->Sei
      i->zy  , I->Zy
      
      TEXT:
      
      ZYt zys already lookzyng lzyke sezye MDZY Azyr Car wzyll be one of
      sezye major technologzycal dzyscoverzyes of sezye new
      century. ZYnventor Guy Negre has developed a car capable of a top
      speed of 110 km/h, 300 kzylometres on one tank of fuel and at a cost
      of just a penny per kzylometre. All of sezyzys at "zero
      pollutzyon". ZYn fact sezye car cleans sezye azyr zyt uses.  
      Check www.sezyeazyrcar.com !