Upwork Test Answers: Get all the correct answers of most recent and possible Upwork Tests A to Z (Updated on Jan, 2016)
Cover Letter Templates: These cover letter samples are not only for Upwork job, but also you will have some idea about your real life job
 
Freelance Profile Overviews: Different Profile samples and overviews of experts, advanced and intermediate level freelancers
For Newbie of Upwork: Upwork Help - How to apply for a job in Upwork with 10 most important articles about Upwork

A to Z View - All Upwork Test Answers

Upwork Unix Test Answers

Here you will find all Upwork Unix Test Answers of Upwork Operating System Category with more then 100 test questions and answers, please find your desired answers of the Unix test questions
-------------------------------------------------------------------------------------------------------------------------

1. The wc filter :
 Answers: • counts the number of words in a disk file or in the standard input or • counts the number of characters in a disk file or in the standard input or • counts the number of lines in a disk file or in the standard input

 2. Which command compresses a file?
 Answers: • compress or • zip

 3. Who can change the password of a user account?
 Answers: • The root user or • Account owner

 4. Which of the following commands can be used to view the calendar of April 2007?
 Answers: • $ cal april 2007 or • $ cal 4 2007

 5. The file oldies-goldies has the details of the sale of books.The records are sorted on the names of the authors and are as follows

 Alexandre Dumas
 Alexandre Dumas
 Alexandre Dumas
 Gerald Durrell
 Giovanni Guareschi
 Giovanni Guareschi
 James Herriot
 Louisa May Alcott
 Louisa May Alcott
 Louisa May Alcott

 Based on the above information, what will be the output of the command

 uniq -u oldies-goldies ?
 Answers: • Gerald Durrell James Herriot

 6. Which keystroke combination sends or signals an interrupt request to a process ?
 Answers: • Ctrl+c

 7. Which command will you use to count the number of words in a file?
 Answers: • wc

 8. The main objective of a time-sharing operating System like UNIX is to :
 Answers: • Minimize the user response time.

 9. Which command gives information about space being used by files and directories ?
 Answers: • du

 10. The chmod command :
 Answers: • changes the access permissions of a file or directory.


 11. Which of the following locations store the information about the currently installed Software on a local system?
 Answers: • /var/adm/sw/products

 12. What will be the result of command '' rm -r directory/* ''?
 Answers: • It will remove all the files but not the directory

 13. What is the exit code of a successful command ?
 Answers: • 0

 14. Which variable contains the system prompt ?
 Answers: • PS1

 15. The mv command :
 Answers: • a,b and c

 16. Which of the following commands can be used to change group ownership of a file/directory?
 Answers: • chgrp

 17. Which option used along with find prompts the user for confirmation before any operation is performed on a file ?
 Answers: • -ok

 18. The command

 rmdir c-prog

 will not work if :
 Answers: • c-prog is not empty.

 19. Which command is used by a user to define a printer for their session?
 Answers: • Using lpadmin command

 20. The command

 ls | more

 displays a list of :
 Answers: • all the files in the current directory one screen at a time.

 21. Which special variable will display the exit status of the last executed command in Bourne or Korn shell?
 Answers: • $?

 22. Which variable will display the list of the positional parameters?
 Answers: • $*

 23. Which option of the uniq command would you use to display only those lines which have a multiple occurrence ?
 Answers: • -c

 24. Point out the incorrect statement regarding standard input , output and error :
 Answers: • The input , output and error output can be redirected to a file other than the standard file using file descriptors and the > or < symbol.

 25. Which option of the sort filter performs a numeric sort ?
 Answers: • -n

 26. You want to read through the reference manual.What command will you use ?
 Answers: • man

 27. You want to make a new directory.What command will you use ?
 Answers: • mkdir

 28. Which UNIX command provides the type of information contained in a particular file ?
 Answers: • file filename

 29. Which of the following statements regarding file naming is incorrect?

 File names :
 Answers: • are not case sensitive.

 30. Which type of users can be associated with each file in UNIX ?
 Answers: • The file owner.

 31. Which of the following commands can be used to communicate directly with other users by sending messages?
 Answers: • $ talk

 32. Which screen manipulation command sets the screen to reverse video?
 Answers: • tput rev

 33. Consider the following command

 cat re*

 Which of the following files will not be displayed by this command ?
 Answers: • Receipt

 34. Suppose you have a file named trans and you want to display fields two to four. Which of the following commands will you use ?
 Answers: • b or c.

 35. Which of the following files is configured for login name, login directory and login shell variables?
 Answers: • /etc/passwd

 36. Which option used along with the find command allows one to perform operations on the files that are located by the find command ?
 Answers: • c or d.

 37. Which filter will you use to translate a set of charaters to another ?
 Answers: • tr

 38. Which command will symbolically link two files in a directory?
 Answers: • ln -s f1 f2

 39. What is the default standard error file ?
 Answers: • stderr

 40. Which of the following commands can be used to add the read and write permissions to the user and group classes of a file named abc?
 Answers: • chmod ug+rw abc

 41. Which command identifies the current working directory ?
 Answers: • pwd

 42. Mounting a file system means :
 Answers: • Providing a link to the filesystem to be mounted so that it appears as a local subdirectory.

 43. What is the file descriptor for the standard error file ?
 Answers: • 2

 44. With regard to UNIX, a process is :
 Answers: • a program in a state of execution.

 45. Which of the following is incorrect about the restrictions imposed by the restricted shell ?
 Answers: • The user cannot move out of the current working directory.

 46. Which of the following characters can be used to run multiple commands on a single line?
 Answers: • ;

 47. Which command will you use to see your current group?
 Answers: • id

 48. Which command will delete a directory only if it is empty ?
 Answers: • rmdir

 49. Using which command can you move to a different directory?
 Answers: • cd

 50. Pipes is/are :
 Answers: • a special feature by which the standard output of a command or user program can be sent as the standard input to another command or user program

 51. Which command would make the scope of a shell variable global to the subshells ?
 Answers: • export

 52. Which of the following statements is incorrect ?
 Answers: • At the core of UNIX is the shell, a program controlling the computer's resources.

 53. What is the correct command to delete all files with two character file-names from the directory /user/group2 ?
 Answers: • rm /user/group2/??

 54. Study the following statements and select the incorrect one :
 Answers: • UNIX process priorities cannot be changed by the user.

 55. UNIX offers the following benefits :
 Answers: • a,b and c.

 56. In UNIX , shell is a program which :
 Answers: • a and c.

 57. You want to search for the pattern "Newa" or "Newb" or "Newc". Which regular expression will you use with the grep command ?
 Answers: • a or b.

 58. Which of the following statements is incorrect regarding variables?
 Answers: • Environment variables are created by the shell.

 59. What is the file descriptor for the standard output file ?
 Answers: • 1

 60. Which command invokes a text editor ?
 Answers: • vi

 61. Which option of the uniq command would you use to display lines with only one occurence?
 Answers: • -c

 62. What is the default UNIX prompt?
 Answers: • $

 63. What is the number of standard file pointers in UNIX?
 Answers: • 3

 64. In which of the following high level languages most of the UNIX is written?
 Answers: • C

 65. Which command is used to run a command at a specified time ?
 Answers: • at

 66. You have two variables, v1 and v2. You want to assign the value of v2 to v1.Which of the following declarations is correct ?
 Answers: • v1=v2

 67. What communication command allows a user to communicate with another user logged on by splitting the screen and providing two way communication ?
 Answers: • talk

 68. The number of arguments can be known by which variable ?
 Answers: • $#

 69. UNIX is an example of :
 Answers: • Time sharing operating system.

 70. What information does the who am i command display?
 Answers: • The user's name.

 71. You want to declare a variable vs with the value hello. Which of the following declarations is correct ?
 Answers: • b or c

 72. Which of the following is not a filter ?
 Answers: • echo

 73. What is the command that can print lines of 1st file matching with 2nd file ?
 Answers: • comm

 74. Which file contains the commands run by all users at login?
 Answers: • /usr/init

 75. Which command would you use if you want to display selective fields from a file ?
 Answers: • cut

 76. Which filter is used to copy the standard input to the standard output and also to a disk file ?
 Answers: • tee

 77. You are writing a shell script.For a given condition, you want to terminate a loop. Which command will you use ?
 Answers: • break

 78. The find command :
 Answers: • Is used to locate files in a directory and in all subdirectories of that directory.

 79. By which screen manipulation command can you specify the coordinates for the cursor position ?
 Answers: • tput cup

 80. Highlight the incorrect statement regarding the uniq command :
 Answers: • It can display lines that are repeated.

 81. The command

 rm -r project
 Answers: • recursively deletes the directory project and all its subdirectories.

 82. You want to specifically search for the character [ . What character(s) would you use in the expression to achieve this ?
 Answers: • \

 83. Which screen manipulation command sets the screen back to normal?
 Answers: • tput smso

 84. Which character of the grep filter specifies that the pattern preceding it must occur at the end of each line ?
 Answers: • $

 85. Which option of the grep filter prints out all those lines that do not match the pattern specified by the regular expression ?
 Answers: • -n

 86. Which character would be used in the grep filter to specify a pattern which consists of any one of a set of characters?
 Answers: • .

 87. The user passwords are kept in which file on most Unix systems?
 Answers: • /etc/passwd

 88. Which option of the sort filter folds lower case characters to upper case ?
 Answers: • -f

 89. Which file contains the commands that the system executes when a user logs in?
 Answers: • $HOME/.profile

 90. The executable file name for the Bourne shell is :
 Answers: • sh

 91. By which command a user can add a password for his login name?
 Answers: • passwd

 92. Which of the following is the only filter?
 Answers: • wc

 93. Consider the following file listing of file abc1 for a user abc

 -rw------- 1 abc student 10 jan 10:39 abc1

 What inference would you make regarding the file access permissions ?
 Answers: • Only the owner has read and write but no execute permissions.

 94. Which command gives all differences between two files ?
 Answers: • diff

 95. Which of the following shells is typically used for guest logins and in secure systems ?
 Answers: • sh

 96. Which option of the sort filter changes the output to reverse order ?
 Answers: • -r

 97. Which of the following is not a valid file command ?
 Answers: • break

 98. Which wild-card matches one character ?
 Answers: • ?

 99. A single command which lists all files in a directory, distinguishing between a directory, executable and symbolic link files is:
 Answers: • ls -l

 100. What would be displayed on the screen if the pwd command is entered when the user is in /usr directory?
 Answers: • usr/

 101. Which of the following statements is incorrect regarding positional parameters ?
 Answers: • The command name is put into the variable $1.

 102. How can a root user find the password of a user who has forgotten his password?
 Answers: • It is not possible

 103. Which of the following statements is incorrect regarding the UNIX environment?
 Answers: • It does not allow relative path names.

 104. Which command is used for splitting a file horizontally?
 Answers: • b and c

 105. Which of the following is a responsibility of the system administrator?
 Answers: • a,b and c

 106. The shell variable that defines internal field separator is.
 Answers: • IFS

 107. Which of the following statements is not true regarding the grep filter?
 Answers: • grep can be used without specifying a regular expression.

 108. What control character signals the end of the file ?
 Answers: • Ctrl+d

 109. Which command will you use to see the available routes and their status?
 Answers: • netstat -rn

 110. Which error will you see when an NFS client can no longer access mounted file system?
 Answers: • Stale File Handle

 111. What is the user id of a root user?
 Answers: • 0