practice

.pdf

School

Simon Fraser University *

*We aren’t endorsed by this school

Course

5375

Subject

Computer Science

Date

Dec 6, 2023

Type

pdf

Pages

3

Uploaded by BailiffRaven3669

Report
CS 3375 001 Practice Exam Questions 1. General knowledge (15) a. Name two unix servers (Sun solaris) you can log into at UTD. b. The file test_file has been created and you have permission to read and execute it. Provide four different unix commands (Sun solaris) to view the contents of the file (not edit the file). b. Provide the commands to delete a line of text in the Pico, Vi, and emacs editors. c. The cs 3375 subdirectory under Dr. Cooper’s account has the following directory in it: drwxr-xr-x 2 kcooper cs 512 Nov 2 14:23 shell Provide a sequence of one or more commands to make a copy of this directory and its contents into your own 3375 directory. d. Describe the 9 file permission bits in terms of their purpose and organization. e. Given the following file permissions, can someone other than the owner who is outside the group cs change directories to the shell directory? Explain why or why not. drwx---r-x 2 kcooper cs 512 Nov 2 14:23 shell
2. Shell environment and scripting (15) a. “sha-bang” - What is the purpose of the “sha-bang” syntax used at the beginning of a script? - Provide the syntax for a BASH script. - Is it possible to execute a script file that does not have the “sha-bang” line in it? b. What is the difference between job control and process control? Give an example of two commands for each. c. Circle all the statements that are true: - BASH is the only shell available for unix (Sun Solaris) - The presence or absence of whitespace in a BASH script never makes a difference in the interpretation of a script - PATH and XTERM are environment variables - Single quotes, double quotes, and backquotes all behave exactly the same way in BASH - the * meta-character means zero or more matches - the ? meta-character means exactly 2 matches d. The contents of a directory contains the following files that you have read and execute access to: chap chap01 chap03 chap15 chap17 chapy chap.txt chap02 chap04 chap16 chapx chapz .txt Give a command to: - list all the files - list the files that have the characters chap, followed by either a 0 or a 1, followed by any number of arbitrary characters What is the result of the following command? ls chap[a-z]*.*
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help