IPT - A Virtual Approach IPT A Virtual Approach by Peter Whitehouse
Quick Links:
 
 
Information and Intelligent Systems Social and Ethical Implications Human Computer Interaction Software and Systems Engineering eXercise Files Course Outline and Assessment A-Z of Geeky Acronyms Terrace Work Program 2004 Sillybus FAQ = Frequently Asked Questions Help
 
 

Computer Systems

eXercise #8


Operating System Activities

Presented in the following page are practical exercises that use some commands from two common operating systems: MSDOS and LINUX.

Some of the most commonly used (and therefore useful) commands are covered here.


MS-DOS

The following exercises assume you have access to the DOS prompt... should you be unable to complete these exercises on your own machine, you will need to arrange access to a DOS computer in Computer Lab 4.8

In most cases, the request (ie. what is required of you) is presented first followed by a possible solution (in brackets). The tasks are designed to be completed IN ORDER as their effects are designed to be accumulative.

The activities that follow are designed to give you first hand experience with INTERNAL and EXTERNAL MS-DOS commands. You are instructed to try the commands given. You will need a blank DATA DISK, as most activities will be involving files that reside on them. DO THESE IN THE ORDER SPECIFIED!

If Unsure, ASK for assistance.

  1. BOOT your computer, and drop through the menu system to dos, to the ROOT directory of the C: drive - check the DOS version (ver).

  2. FORMAT your data disk as a system disk with the volume name set to FRED and report the capacity of the disk. (format a: /s /v:FRED)

  3. REBOOT your computer with your datadisk in the drive to test you have created a system bootable disk, report what you are prompted for on boot.

  4. Perform a Directory of your disk, and report the name and file size of the file present in the normal listing.

  5. Perform a Dir a:\ /a:s, and report any files that appear, along with their sizes in bytes (a system attribute listing)

  6. REBOOT your computer without your disk in the drive, then drop through to the ROOT directory of the c: drive and replace your disk in the floppy drive.

  7. LOG to the a: drive, and report the prompt displayed.

  8. From the a: drive, request a wide directory listing of the \gtsys directory - a sub-directory of the c: drive (dir c:\gtsys /w) and report the number of files, the amount of storage used by that sub-directory, and the remaining space on the disk.

  9. While logged to the ROOT directory of the a: drive, perform the following directory request and report its action: (dir c:\ /p)

  10. create a directory on your disk called IPT (md IPT). Perform a directory of the drive to confirm the presence.

  11. Change to the IPT directory on your disk and report the prompt (cd ipt).

  12. Perform a normal directory listing and report the information displayed. Perform the following directory requests and report their outcomes: (dir .) and (dir ..)

  13. While logged to your IPT directory, COPY all of the files from the HDM directory (a sub-directory of the c: drive) into the IPT sub-directory of your disk (copy c:\hdm\*.*) and report the number of files that were copied.

  14. Log back to the ROOT of the a: drive

  15. Drag copies of all files that start with 'HDM' from the IPT subdirectory to the ROOT of the a: drive (copy \ipt\hdm*.*) and report the number of files that were transferred.

  16. Log to the ROOT directory of the c: drive, then create a directory called HOMEWORK as a branch of the IPT directory (md a:\ipt\homework)

  17. COPY all files in the ROOT directory of the A: drive into the HOMEWORK sub-directory just created (copy a:\. a:\ipt\homework)
  18. LOG to the ROOT directory of the a: drive, and make a subdirectory called USER, then log to it

  19. Report the command you would use to empty the HOMEWORK directory from where you are (ie. in a:\USER), then try it to check it works (verify with a dir of the now empty directory).

  20. Whilst still logged to the USER directory COPY all .com files that are in the ROOT directory of the c: drive to the HOMEWORK directory, and report the command you used (be sure to check it has worked)

  21. Use the following command: copy con a:\test.txt to create a text file with the words:
      the hills
      are alive
      with the
      sound of
      mucous
    press enter at the end of each line. Finish the file with a Ctrl-Z, Enter to return to the DOS prompt

  22. Verify the file test.txt exists by issuing the command: type a:\test.txt.

  23. Report the size of the file, in bytes, from a directory listing.

  24. Log to the USER directory on your disk and RENAME the copy of command.com that is now in your HOMEWORK directory to the name albatros.man. Report the command you used

  25. Report the actions of the following internal commands:
    • cls
    • prompt
    • ver
    • vol
    • echo


  26. Log to the ROOT directory of your a: drive, and report the actions of the following external commands:
    • tree
    • tree /f
    • mem
    • mem /p
    • chkdsk
    • mode


  27. Issue the following commands, and report their actions:
    • prompt $t
    • prompt $d
    • prompt $p
    • prompt $v$n
    • prompt $g
    • prompt Yes Master $n
    • prompt $t $p $n


  28. Issue the following command:
      sort /+1 <; a:\test.txt >; a:\junk.txt
    then type a:\junk.txt and report the effect of the command.

  29. Issue the following command:
      sort /r/+3 <; a:\test.txt >; a:\junk2.txt
    then type a:\junk2.txt and report the effect of the command.

  30. Issue the following command:
      find /n "the" a:\test.txt a:\junk.txt
    and report the effect of the command.

  31. Issue the following command:
      find /n "albatross" a:\test.txt
    and report the effect of the command

  32. Issue the command:
      the albatross did not signify
    and report the effect

  33. Re-format your data disk as a 1.44Mb non-systems disk with your surname as the volume name

UNIX

The activities that follow are designed to give you first hand experience with some simple Linux-UNIX commands. You are instructed to try the commands given AFTER your teacher has established network connection for you. If Unsure, ASK for assistance.

  1. Make sure you gain access to the root directory (type pwd [enter] to print the working directory name - it will be the root /)

  2. Perform directory listing requests using the following commands noting the resultant effects of the switches: ls ls -l Examine the long listing (ls-l) to discover file privileges (d=directory, x=executable, r=read, w=write access)

  3. Log to the tutorial directory (cd /tutorial) and pwd to check that you have arrived correctly

  4. Perform a wide directory listing (ls) and a wide directory listing of tutorials' immediate ancestor (ls ..)

  5. log to the users directory, a sub-directory of the tutorial directory (cd /users) and create a directory called your surname (mkdir moncrieff for example) then log to your own directory. pwd to convince yourself you have arrived

  6. View the contents of the file julieandrews.text that resides in the tutorial directory without logging there (cat /tutorial/julieandrews.text) or (cat ../../julieandrews.text)

  7. Drag a copy of julieandrews.text into your currently logged directory (cp ../../julieandrews.text)

  8. Rename your copy of julieandrews.text to sound1 using a variation on the move (mv) command (mv julieandrews.txt sound1)

  9. Drag a copy of floyd.lyrics from the users directory which is a sub-directory of the tutorial directory (cp /tutorial/users/floyd.lyrics .) or (cp ../floyd.lyrics .)

  10. Create a third file in your directory called junk that contains the contents of both sound.music and floyd.lyrics (cat sound1 floyd.lyrics >; junk) Then display the contents of the new file on the screen (cat junk)

  11. Delete junk (rm junk)

  12. Copy the file sound1 to the file sound2 (cp sound1 sound2)

  13. Edit the file sound2 using the line editor (ed sound2[enter] then type 5s/music/mucous[enter] to search line 5 for the word 'music' and replace it with the word 'mucous', press w[enter] to save the file, then press q[enter] to quit the editor). cat sound2 to check the change has been made

  14. Find all differences between the two files sound1 and sound2 (diff sound1 sound2)

  15. Count the number of words in the file floyd.lyrics by trying: wc floyd.lyrics wc -w floyd.lyrics wc -l floyd.lyrics

  16. Find all lines in the file floyd.lyrics that contain the word 'time' (grep 'time' floyd.lyrics)

  17. Display the first 4 lines of floyd.lyrics (head -4 floyd.lyrics) on the screen, then display the last 5 lines of the same file (tail -5 floyd.lyrics) on the screen

  18. Arrange the lines of the floyd.lyrics in alphabetical order, displaying the result on the screen (sort floyd.lyrics)

  19. Determine the free disk space (1 block = 512 bytes) by using df

  20. Ask unix for a current calendar (cal), and then a specific calendar (cal 1 1984 gives january'84 for example - try your birthmonth and year)

  21. Ask Linux who is currently logged on the system (who), then ask the system what the date is (date)

  22. Empty your directory of all files (rm *) and then log back to the root (cd /) then delete your users directory (rmdir /tutorial/users/moncrieff) before asking your teacher to shut down the system.

wonko@wonko.info
©Copyright t 1992..2017+. Edition 25.150117
wonkosite
Creative Commons License
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 2.1 Australia License
.