You are on page 1of 2

Aim: To test, through some practical exercises, your understanding of some aspects of Operating Systems. 1.

Match the operating system with information about it A. MacOS B. Unix C. Linux D. DOS E. Windows a) Which is the operating system of choice for Apple Computers? b) Historically, which is the operating system of choice for serious programmers? c) Which is the PC version of Unix? d) What is the Microsoft operating system family provided on PCs called? e) What is the original PC operating system called? 2. Suppose you have a file called 'MyImportantData' in your current working directory. State the commands you need to enter in Linux to: a) Create a copy of 'MyImportantData' called 'MyImportantData.backup' in a new directory within the current working directory called 'Backups'. b) Copy the directory 'Backups' and all its contents to a new directory 'Backups2' in the current working directory. c) Delete the entire contents of the directory 'Backups2' without changing your current working directory. d) Delete the entire directory 'Backups2' and anything in it. 2. The command 'ps' in Linux lists the processes you are currently running (try it by default it just lists the processes associated with the current shell window). How would you send the output of this command to a file called 'out'? 3. If you type 'ps aux' you get detailed information about all processes running. This list will be too long to fit on a screen. How can you view this data one page at a time? 4. What does the following command do?
ps aux | tee out > list

5. How can you view running processes in Windows? 6. Suppose you have entered these, and only these, commands so far.
cd / cd pwd ls

Which of these commands do the following match and why a) !c b) !1 - that is, a one not the letter 'l' c) !! d) !l -a NOTE: Assume that each of the three commands are the only ones typed! That is, for example, the command '!!' is typed after the 'ls' command, and not the '!1' command. 7. In Linux (and Windows) you can use the command 'pushd' instead of 'cd'. That is, you can type (say) pushd .. instead of 'cd ..'. In what way is 'pushd' different from 'cd' (hint: you also need to find out about the command 'popd'). 8. Suppose in a Linux shell you entered the command:
export PATH=lemon

and then tried typing some commands. What would happen and why? 9. Suppose you want to compare the contents of two text files - how would you do this in Linux? You should include a very simple example in your answer. Note there is not just one correct answer. 10. How might you do this in Windows? 11. You might think that everything in the computer's file system is a file - but it isn't. Try this in Linux:
cd /dev; ls | more

(The ';' just lets you type more than one command on a line - you can put them on separate lines if you like.) What do you think the things you see on the screen represent? (Hint: look carefully for some terms you recognize.) 12. Create a simple file using echo (e.g. 'echo Exterminate > dalek') and then try
cp dalek /dev/tty

What happens and why? (Hint: 'tty' is an old abbreviation for terminal).

You might also like