Beruflich Dokumente
Kultur Dokumente
For your Linux final, you will be asked to perform a series of tasks from the command line.
You will perform a series of common tasks and write the correct syntax of each command. Given
limited time, you will need to be well prepared and able to move quickly. Here is a brief sample of
tasks but your mission will be more extensive.
Complete the following sequence of actions inside a new terminal window. Unless specified
otherwise, you must complete each task using at most one command (or several commands piped
together). If you cannot quickly determine how to perform a task then move on to the next one.
1. Create a directory named PracticeFinal.
2. Use a single command to create a directory named innerDir inside PracticeFinal.
3. Copy all the files from /home/kurmasz/public/CS163/PracticeFinalFiles to
your PracticeFinal.
4. Inside PracticeFinal/sampleFiles, you fill find several files whose names and
content have an obvious pattern. Write a shell script that will generate a similar set of files and
place them in innerDir.
5. From the directory PracticeFinal, use relative path names and the diff command to
compare the versions of file1 in sampleFiles and innerDir.
6. Now, repeat problem #5, but use absolute path names.
7. Move into innerDir and repeat problem 5.
*). Move into the PracticeFinal directory.
8. The file sampleScript is a perl script. You can run it with this command:
perl sampleScript. Make the necessary changes so that you can run it directly from the
command line like this: ./sampleScript.
9. Use ssh to run sampleScript on eos24. You will need to use a full path name to refer
to the script.
10. Each of Lady Macbeth’s speaking parts comprises several lines of text in macbeth.txt.
Use the grep command, and only the grep command, to print the first 3 text lines of each of
Lady Macbeth’s speaking parts. Hint: Use the man pages.
11. Give the full path name of the file that is executed when you run javac from the command
line.
12. Review the Practice Linux Quiz.