Unix - Application Developers

35 Questions | Total Attempts: 186

SettingsSettingsSettings
Please wait...
Unix Quizzes & Trivia

Technical Questionnaire for UNIX Application Developers


Questions and Answers
  • 1. 
    Which of the following UNIX commands will not take the user student5 to his personal home direcotry:
    • A. 

      Cd

    • B. 

      Cd /~

    • C. 

      Cd ~

    • D. 

      Cd ~student5

  • 2. 
    What is a shell in UNIX:
    • A. 

      A program through which users can issue commands to UNIX.

    • B. 

      A window management system.

    • C. 

      The logn screen.

    • D. 

      The thing that rides on the back of a turtle in UNIX.

  • 3. 
    What is the generic syntax for all UNIX commands:
    • A. 

      Command name, followed by arguments, followed by options

    • B. 

      Command name, followed by arguments,

    • C. 

      Command name, followed by options

    • D. 

      Command name, followed by options, followed by arguments

  • 4. 
    Which of the following represents an absolute path:
    • A. 

      ./home/file.txt

    • B. 

      Bin/cat

    • C. 

      Cs2204/

    • D. 

      /usr/bin/cat

  • 5. 
    • A. 

      Chmod 046 textfile

    • B. 

      Chmod 640 textfile

    • C. 

      Chmod 310 textfile

    • D. 

      Chmod rw r nil textfile

  • 6. 
    Which of the following is not a UNIX file type:
    • A. 

      Plain file

    • B. 

      Special file

    • C. 

      Batch file

    • D. 

      Directory file

  • 7. 
    When the in command is used, which of the following occurs:
    • A. 

      A file is created that points to an existing file.

    • B. 

      A file is created that is a copy of an existing file.

    • C. 

      A file is moved from one location to another.

    • D. 

      A file is renamed.

  • 8. 
    Which command will print the contents of ll files inthe current directory whose names start with the character 'a' and end with a period ('.') followed by any two characters followed by a number:
    • A. 

      Is a*.??[0-9]

    • B. 

      Is a*.??#

    • C. 

      Cat a*.??[0-9]

    • D. 

      Cat a?.**#

  • 9. 
    The apropos command is used to:
    • A. 

      Obtain a list of commands whose description contains given keywords.

    • B. 

      Change the system language to French

    • C. 

      Get help on a particular command.

    • D. 

      Create a new binary file.

  • 10. 
    Which of these is not a common UNIX shell:
    • A. 

      Bash

    • B. 

      Sh

    • C. 

      Fresh

    • D. 

      Ksh

  • 11. 
    In ksh, what is the difference between the expressions VAR and $VAR:
    • A. 

      VAR refers to a variable name and $VAR to its value.

    • B. 

      VAR refers to a variable value and $VAR to its name.

    • C. 

      VAR refers to an integer variable and $VAR to a string variable.

    • D. 

      Both expressions refer to the same thing.

  • 12. 
    Which of these expressions shows the proper way to add the directory /usr/bin to a path:
    • A. 

      PATH+=/usr/bin

    • B. 

      PATH=/usr/bin

    • C. 

      $PATH:/usr/bin

    • D. 

      PATH=$PATH:/usr/bin

  • 13. 
    What is the default datatype of variables in ksh shell scripts:
    • A. 

      Integer

    • B. 

      Floating point

    • C. 

      Character

    • D. 

      String

  • 14. 
    Which of these situations would cause an error message to be printed after typing the commad "my_script" on the command line.  This assumes that my_script is a ksh script.
    • A. 

      My_script dos not have execute permission set.

    • B. 

      The current working directory is not in the PATH.

    • C. 

      Both a and b.

    • D. 

      Neither a nor b.

  • 15. 
    In a ksh script, how is the beginning and end of a block of statements in a while loop indicated.
    • A. 

      With { and }

    • B. 

      With [ and ]

    • C. 

      With while and elihw.

    • D. 

      With do and done.

  • 16. 
    What is the meaning of the expression ${sports[*]} in a ksh script:
    • A. 

      All of the elements of the array sports.

    • B. 

      The number of elements in the array sports.

    • C. 

      The first element in the array sports.

    • D. 

      I love sports!

  • 17. 
    What is the default list upon which a for loop operates in a ksh script (i.e. a script contains "for x" rather than "for x in y").
    • A. 

      The list of files in the current working directory.

    • B. 

      The list of currently running processes.

    • C. 

      The list of arguments to the script

    • D. 

      The list 1, 2, 3, 4, ...

  • 18. 
    What UNIX command is used to update the modification time of a file:
    • A. 

      Time

    • B. 

      Modify

    • C. 

      Cat

    • D. 

      Touch

  • 19. 
    In which situation can regular expressions not be used.
    • A. 

      Filtering of email coming from a particular internet domain name.

    • B. 

      Calculation of student grades based on percentaes.

    • C. 

      Extraction of all transactions in a database with a customer number of 1000 or less.

    • D. 

      Specification of the format of a string representing a zip code.

  • 20. 
    What would be the output of the command:  egrep "^[^A-Za-z].*!" file:
    • A. 

      All lines in file beginning with a non-alphabetic character and containing an exclamation point elsewhere on the line.

    • B. 

      The number of lines in file beginning with a non-alphabetic character and containing an exclamation point elsewhere on the line.

    • C. 

      All lines in file beginning with an alphabetic character and containing a period, an asterisk, and an exclamation point.

    • D. 

      The number of lines in file not containing any alphabetic characters before the first exclamation point..

  • 21. 
    Which string(s) would be matched by the regular expression:| "stu(dent)? [0-9]+".
    • A. 

      Student 1

    • B. 

      Student

    • C. 

      Stu 195819588491

    • D. 

      Studentdent 5

  • 22. 
    Which regular expression (egrep style) means "all lines beginning with a number.
    • A. 

      “[^0-9]”

    • B. 

      “^[#]”

    • C. 

      “^[0-9]”

    • D. 

      “[0-9].*$”

  • 23. 
    Which regular expresion (egrep style) means "all lines containing an alphabetic word ending with ".txt" followed by a space or the end of the line":
    • A. 

      "*.txt "

    • B. 

      "*.txt( |$)"

    • C. 

      "[a-zA-Z]*\.txt( |$)"

    • D. 

      "[a-zA-Z]?\.txt\n"

  • 24. 
    In order to edit a file called sample.txt, it will be necessary to type:
    • A. 

      Edit sample.txt

    • B. 

      Vi sample.txt

    • C. 

      Sample.txt

    • D. 

      Vi qui - TAB.

    • E. 

      None of the above

  • 25. 
    In order to delete a word in a file using vi, place the cursor on the first letter of the word, ESC and type:
    • A. 

      Dw

    • B. 

      A

    • C. 

      X

    • D. 

      Z

    • E. 

      None of the above.