Upwork Unix Test 2016
111 Answered Test Questions:
1. The wc filter :
Answers:
a. counts the number of words in a disk file or in the standard input
a. counts the number of characters in a disk file or in the standard input
a. counts the number of lines in a disk file or in the standard input
a. can only be used with one file at a time
2. Which command compresses a file?
Answers:
a. compress
a. zip
a. pack
a. comp
a. size
3. Who can change the password of a user account?
Answers:
a. Administrator
a. The root user
a. All the members of the Administrator group
a. Account owner
4. Which of the following commands can be used to view the calendar of April 2007?
Answers:
a. $ cal april 2007
a. $ cal april 07
a. $ calendar 4 07
a. $ 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
1. The wc filter :
Answers:
a. counts the number of words in a disk file or in the standard input
a. counts the number of characters in a disk file or in the standard input
a. counts the number of lines in a disk file or in the standard input
a. can only be used with one file at a time
2. Which command compresses a file?
Answers:
a. compress
a. zip
a. pack
a. comp
a. size
3. Who can change the password of a user account?
Answers:
a. Administrator
a. The root user
a. All the members of the Administrator group
a. Account owner
4. Which of the following commands can be used to view the calendar of April 2007?
Answers:
a. $ cal april 2007
a. $ cal april 07
a. $ calendar 4 07
a. $ 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
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:
a. Gerald Durrell
a. James Herriot
a. Gerald Durrell James Herriot
a. Alexandre Dumas Gerald Durrell Giovanni Guareschi James Herriot Louisa May Alcott
a. Louisa May Alcott
6. Which keystroke combination sends or signals an interrupt request to a process ?
Answers:
a. Ctrl+c
a. Ctrl+d
a. Ctrl+u
a. Ctrl+s
a. Ctrl+q
7. Which command will you use to count the number of words in a file?
Answers:
a. count
a. grep
a. wc
a. word count
8. The main objective of a time-sharing operating System like UNIX is to :
Answers:
a. Minimize the net execution time.
a. Maximize the processor utilization.
a. Minimize the user response time.
a. Minimize the number of instructions required for a process.
a. Minimize the end user’s involvement required for a task.
9. Which command gives information about space being used by files and directories ?
Answers:
a. sp
a. mem
a. hd
a. du
a. rm
10. The chmod command :
Answers:
a. changes the current execution status from the user mode to the kernel mode.
a. makes a file hidden so that it cannot be seen using the ls command.
a. switches the screen from character to graphical mode.
a. changes the access permissions of a file or directory.
a. changes the password of a user.
11. Which of the following locations store the information about the currently installed Software on a local system?
Answers:
a. /var/adm/sw/install
a. /var/adm/sw/software
a. /var/adm/sw/recent
a. /var/adm/sw/products
12. What will be the result of command ” rm -r directory/* ”?
Answers:
a. It will remove the directory and all the files present in that directory
a. It will remove all the files but not the directory
a. It will show an error message
a. None of the above
13. What is the exit code of a successful command ?
Answers:
a. 0
a. 1
a. -1
a. 100
a. 10
14. Which variable contains the system prompt ?
Answers:
a. PS1
a. PATH
a. PROMPT
a. HOME
a. LOGNAME
15. The mv command :
Answers:
a. changes the name of a file
a. changes the name of a directory
a. moves a file from one location to another
a. a and b
a. a,b and c
16. Which of the following commands can be used to change group ownership of a file/directory?
Answers:
a. chmod
a. chgroup
a. chgrp
a. grpch
17. Which option used along with find prompts the user for confirmation before any operation is performed on a file ?
Answers:
a. -name
a. -type
a. -ok
a. -exec
a. -mtime
18. The command
Answers:
a. Gerald Durrell
a. James Herriot
a. Gerald Durrell James Herriot
a. Alexandre Dumas Gerald Durrell Giovanni Guareschi James Herriot Louisa May Alcott
a. Louisa May Alcott
6. Which keystroke combination sends or signals an interrupt request to a process ?
Answers:
a. Ctrl+c
a. Ctrl+d
a. Ctrl+u
a. Ctrl+s
a. Ctrl+q
7. Which command will you use to count the number of words in a file?
Answers:
a. count
a. grep
a. wc
a. word count
8. The main objective of a time-sharing operating System like UNIX is to :
Answers:
a. Minimize the net execution time.
a. Maximize the processor utilization.
a. Minimize the user response time.
a. Minimize the number of instructions required for a process.
a. Minimize the end user’s involvement required for a task.
9. Which command gives information about space being used by files and directories ?
Answers:
a. sp
a. mem
a. hd
a. du
a. rm
10. The chmod command :
Answers:
a. changes the current execution status from the user mode to the kernel mode.
a. makes a file hidden so that it cannot be seen using the ls command.
a. switches the screen from character to graphical mode.
a. changes the access permissions of a file or directory.
a. changes the password of a user.
11. Which of the following locations store the information about the currently installed Software on a local system?
Answers:
a. /var/adm/sw/install
a. /var/adm/sw/software
a. /var/adm/sw/recent
a. /var/adm/sw/products
12. What will be the result of command ” rm -r directory/* ”?
Answers:
a. It will remove the directory and all the files present in that directory
a. It will remove all the files but not the directory
a. It will show an error message
a. None of the above
13. What is the exit code of a successful command ?
Answers:
a. 0
a. 1
a. -1
a. 100
a. 10
14. Which variable contains the system prompt ?
Answers:
a. PS1
a. PATH
a. PROMPT
a. HOME
a. LOGNAME
15. The mv command :
Answers:
a. changes the name of a file
a. changes the name of a directory
a. moves a file from one location to another
a. a and b
a. a,b and c
16. Which of the following commands can be used to change group ownership of a file/directory?
Answers:
a. chmod
a. chgroup
a. chgrp
a. grpch
17. Which option used along with find prompts the user for confirmation before any operation is performed on a file ?
Answers:
a. -name
a. -type
a. -ok
a. -exec
a. -mtime
18. The command
rmdir c-prog
will not work if :
Answers:
a. c-prog is not empty.
a. c-prog is the current working directory.
a. full pathname is specified with rmdir.
a. a and b.
a. a and c.
19. Which command is used by a user to define a printer for their session?
Answers:
a. Using lpdest environmental variable
a. Using spooler command
a. Using lpadmin command
a. Using printf command
20. The command
Answers:
a. c-prog is not empty.
a. c-prog is the current working directory.
a. full pathname is specified with rmdir.
a. a and b.
a. a and c.
19. Which command is used by a user to define a printer for their session?
Answers:
a. Using lpdest environmental variable
a. Using spooler command
a. Using lpadmin command
a. Using printf command
20. The command
ls | more
displays a list of :
Answers:
a. all the files in the current directory.
a. all the files in the current directory one line at a time.
a. all the files in the current directory one screen at a time.
a. all the files in the current directory and then waits for the next command.
a. all the files in all the directories.
21. Which special variable will display the exit status of the last executed command in Bourne or Korn shell?
Answers:
a. $#
a. $-
a. $?
a. $$
a. $!
22. Which variable will display the list of the positional parameters?
Answers:
a. $#
a. $*
a. $?
a. $$
a. $!
23. Which option of the uniq command would you use to display only those lines which have a multiple occurrence ?
Answers:
a. -u
a. -d
a. -c
a. -l
a. -r
24. Point out the incorrect statement regarding standard input , output and error :
Answers:
a. The terminal is the standard source for input and the standard output and standard error destination for most UNIX commands.
a. All data sources and destinations are treated as files in UNIX.
a. The three standard files have a file descriptor 0 – standard output file 1 – standard input file 2 – standard error file
a. The input , output and error output can be redirected to a file other than the standard file using file descriptors and the > or < symbol.
a. The output and error can be redirected in the append mode to add the redirected output or error to an existing file using the >> symbol.
25. Which option of the sort filter performs a numeric sort ?
Answers:
a. -r
a. -f
a. -n
a. -t
a. -o
26. You want to read through the reference manual.What command will you use ?
Answers:
a. assist
a. help
a. reference
a. aid
a. man
27. You want to make a new directory.What command will you use ?
Answers:
a. md
a. makedir
a. mkdir
a. dirmake
a. newdir
28. Which UNIX command provides the type of information contained in a particular file ?
Answers:
a. more filename
a. type filename
a. file filename
a. info filename
a. list filename
29. Which of the following statements regarding file naming is incorrect?
Answers:
a. all the files in the current directory.
a. all the files in the current directory one line at a time.
a. all the files in the current directory one screen at a time.
a. all the files in the current directory and then waits for the next command.
a. all the files in all the directories.
21. Which special variable will display the exit status of the last executed command in Bourne or Korn shell?
Answers:
a. $#
a. $-
a. $?
a. $$
a. $!
22. Which variable will display the list of the positional parameters?
Answers:
a. $#
a. $*
a. $?
a. $$
a. $!
23. Which option of the uniq command would you use to display only those lines which have a multiple occurrence ?
Answers:
a. -u
a. -d
a. -c
a. -l
a. -r
24. Point out the incorrect statement regarding standard input , output and error :
Answers:
a. The terminal is the standard source for input and the standard output and standard error destination for most UNIX commands.
a. All data sources and destinations are treated as files in UNIX.
a. The three standard files have a file descriptor 0 – standard output file 1 – standard input file 2 – standard error file
a. The input , output and error output can be redirected to a file other than the standard file using file descriptors and the > or < symbol.
a. The output and error can be redirected in the append mode to add the redirected output or error to an existing file using the >> symbol.
25. Which option of the sort filter performs a numeric sort ?
Answers:
a. -r
a. -f
a. -n
a. -t
a. -o
26. You want to read through the reference manual.What command will you use ?
Answers:
a. assist
a. help
a. reference
a. aid
a. man
27. You want to make a new directory.What command will you use ?
Answers:
a. md
a. makedir
a. mkdir
a. dirmake
a. newdir
28. Which UNIX command provides the type of information contained in a particular file ?
Answers:
a. more filename
a. type filename
a. file filename
a. info filename
a. list filename
29. Which of the following statements regarding file naming is incorrect?
File names :
Answers:
a. should not have a blank, or a tab.
a. can contain digits, a dot, the hyphen or the underscore anywhere.
a. can contain both upper-case and lower-case alphabets.
a. are not case sensitive.
30. Which type of users can be associated with each file in UNIX ?
Answers:
a. The file owner.
a. The group owner of the file.
a. Other users who are not part of the group.
a. a and b.
a. a,b and c.
31. Which of the following commands can be used to communicate directly with other users by sending messages?
Answers:
a. $ msg
a. $ talk
a. $ send
a. $ call
32. Which screen manipulation command sets the screen to reverse video?
Answers:
a. tput cup
a. tput smso
a. tput rmso
a. tput blink
a. tput rev
33. Consider the following command
Answers:
a. should not have a blank, or a tab.
a. can contain digits, a dot, the hyphen or the underscore anywhere.
a. can contain both upper-case and lower-case alphabets.
a. are not case sensitive.
30. Which type of users can be associated with each file in UNIX ?
Answers:
a. The file owner.
a. The group owner of the file.
a. Other users who are not part of the group.
a. a and b.
a. a,b and c.
31. Which of the following commands can be used to communicate directly with other users by sending messages?
Answers:
a. $ msg
a. $ talk
a. $ send
a. $ call
32. Which screen manipulation command sets the screen to reverse video?
Answers:
a. tput cup
a. tput smso
a. tput rmso
a. tput blink
a. tput rev
33. Consider the following command
cat re*
Which of the following files will not be displayed by this command ?
Answers:
a. reminder
a. receipt
a. Receipt
a. recipe-cake
a. re.c
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:
a. cut -f4-2 trans
a. cut -f2,3,4 trans
a. cut -f2-4 trans
a. a or b.
a. b or c.
35. Which of the following files is configured for login name, login directory and login shell variables?
Answers:
a. /etc/profile
a. /etc/home
a. /etc/passwd
a. /etc/conf
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:
a. -name
a. -type
a. -ok
a. -exec
a. c or d.
37. Which filter will you use to translate a set of charaters to another ?
Answers:
a. grep
a. cut
a. tr
a. wc
a. tee
38. Which command will symbolically link two files in a directory?
Answers:
a. link f1 f2
a. link -s f1 f2
a. ln f1 f2
a. ln -s f1 f2
a. ln -l f1 f2
39. What is the default standard error file ?
Answers:
a. err
a. error
a. stderr
a. errfile
a. errdev
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:
a. chmod ugo +rw abc
a. chomd abc ug -rw
a. chmod ug -rw abc
a. chmod ug+rw abc
41. Which command identifies the current working directory ?
Answers:
a. pwd
a. cd
a. dir
a. ls
a. cur
42. Mounting a file system means :
Answers:
a. Preparing it for backup.
a. Copying all the files from one filesystem to another.
a. Moving all the files from one filesystem to another.
a. Loading a filesystem from backup medium like tape.
a. 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:
a. 0
a. 1
a. 2
a. 3
a. 4
44. With regard to UNIX, a process is :
Answers:
a. the name of a command.
a. the name of the administrator.
a. the name of the UNIX server.
a. a program in a state of execution.
a. another name for a file.
45. Which of the following is incorrect about the restrictions imposed by the restricted shell ?
Answers:
a. The user cannot move out of the current working directory.
a. The user cannot change the path; execution of programs in directories other than those authorised by the system is prevented.
a. The user cannot specify absolute path-names beginning at the root.
a. The user cannot redirect input or output.
a. The user is not allowed to see the listing of files in his working directory.
46. Which of the following characters can be used to run multiple commands on a single line?
Answers:
a. /
a. :
a. ,
a. ;
47. Which command will you use to see your current group?
Answers:
a. who am i
a. show group
a. group
a. id
48. Which command will delete a directory only if it is empty ?
Answers:
a. rmdir
a. rmdir -r
a. rmdir -e
a. rmdir -t
a. rmdir -u
49. Using which command can you move to a different directory?
Answers:
a. pwd
a. cd
a. ls
a. mv
a. rm
50. Pipes is/are :
Answers:
a. special programs that prevent the system from crashing.
a. disk management utilities.
a. memory management utilities.
a. 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
a. special channels for high speed data transfer.
51. Which command would make the scope of a shell variable global to the subshells ?
Answers:
a. global
a. export
a. scope
a. grant
a. extend
52. Which of the following statements is incorrect ?
Answers:
a. UNIX operating system is available on machines with a wide range of computing power, from microcomputers to mainframes.
a. UNIX is a multi-user system designed to support a group of users simultaneously.
a. UNIX uses a hierarchical file structure to store information.
a. At the core of UNIX is the shell, a program controlling the computer’s resources.
a. UNIX has facilities called pipes and filters which permit the user to create complex programs from simpler programs.
53. What is the correct command to delete all files with two character file-names from the directory /user/group2 ?
Answers:
a. rm /user/group2/..
a. rm /user/group2/??
a. rm /user/group2/**
a. rm /user/group2/–
a. rm /user/group2/;;
54. Study the following statements and select the incorrect one :
Answers:
a. UNIX files assume all data to be consisting of streams of bytes.
a. UNIX commands use the system calls for their operations.
a. UNIX adopts a priority based scheduling strategy.
a. UNIX process priorities cannot be changed by the user.
a. The UNIX system call signal is used to handle interrupts.
55. UNIX offers the following benefits :
Answers:
a. Time-sharing
a. Multi-tasking
a. Multi-programming
a. a and b.
a. a,b and c.
Answers:
a. reminder
a. receipt
a. Receipt
a. recipe-cake
a. re.c
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:
a. cut -f4-2 trans
a. cut -f2,3,4 trans
a. cut -f2-4 trans
a. a or b.
a. b or c.
35. Which of the following files is configured for login name, login directory and login shell variables?
Answers:
a. /etc/profile
a. /etc/home
a. /etc/passwd
a. /etc/conf
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:
a. -name
a. -type
a. -ok
a. -exec
a. c or d.
37. Which filter will you use to translate a set of charaters to another ?
Answers:
a. grep
a. cut
a. tr
a. wc
a. tee
38. Which command will symbolically link two files in a directory?
Answers:
a. link f1 f2
a. link -s f1 f2
a. ln f1 f2
a. ln -s f1 f2
a. ln -l f1 f2
39. What is the default standard error file ?
Answers:
a. err
a. error
a. stderr
a. errfile
a. errdev
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:
a. chmod ugo +rw abc
a. chomd abc ug -rw
a. chmod ug -rw abc
a. chmod ug+rw abc
41. Which command identifies the current working directory ?
Answers:
a. pwd
a. cd
a. dir
a. ls
a. cur
42. Mounting a file system means :
Answers:
a. Preparing it for backup.
a. Copying all the files from one filesystem to another.
a. Moving all the files from one filesystem to another.
a. Loading a filesystem from backup medium like tape.
a. 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:
a. 0
a. 1
a. 2
a. 3
a. 4
44. With regard to UNIX, a process is :
Answers:
a. the name of a command.
a. the name of the administrator.
a. the name of the UNIX server.
a. a program in a state of execution.
a. another name for a file.
45. Which of the following is incorrect about the restrictions imposed by the restricted shell ?
Answers:
a. The user cannot move out of the current working directory.
a. The user cannot change the path; execution of programs in directories other than those authorised by the system is prevented.
a. The user cannot specify absolute path-names beginning at the root.
a. The user cannot redirect input or output.
a. The user is not allowed to see the listing of files in his working directory.
46. Which of the following characters can be used to run multiple commands on a single line?
Answers:
a. /
a. :
a. ,
a. ;
47. Which command will you use to see your current group?
Answers:
a. who am i
a. show group
a. group
a. id
48. Which command will delete a directory only if it is empty ?
Answers:
a. rmdir
a. rmdir -r
a. rmdir -e
a. rmdir -t
a. rmdir -u
49. Using which command can you move to a different directory?
Answers:
a. pwd
a. cd
a. ls
a. mv
a. rm
50. Pipes is/are :
Answers:
a. special programs that prevent the system from crashing.
a. disk management utilities.
a. memory management utilities.
a. 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
a. special channels for high speed data transfer.
51. Which command would make the scope of a shell variable global to the subshells ?
Answers:
a. global
a. export
a. scope
a. grant
a. extend
52. Which of the following statements is incorrect ?
Answers:
a. UNIX operating system is available on machines with a wide range of computing power, from microcomputers to mainframes.
a. UNIX is a multi-user system designed to support a group of users simultaneously.
a. UNIX uses a hierarchical file structure to store information.
a. At the core of UNIX is the shell, a program controlling the computer’s resources.
a. UNIX has facilities called pipes and filters which permit the user to create complex programs from simpler programs.
53. What is the correct command to delete all files with two character file-names from the directory /user/group2 ?
Answers:
a. rm /user/group2/..
a. rm /user/group2/??
a. rm /user/group2/**
a. rm /user/group2/–
a. rm /user/group2/;;
54. Study the following statements and select the incorrect one :
Answers:
a. UNIX files assume all data to be consisting of streams of bytes.
a. UNIX commands use the system calls for their operations.
a. UNIX adopts a priority based scheduling strategy.
a. UNIX process priorities cannot be changed by the user.
a. The UNIX system call signal is used to handle interrupts.
55. UNIX offers the following benefits :
Answers:
a. Time-sharing
a. Multi-tasking
a. Multi-programming
a. a and b.
a. a,b and c.
56. In UNIX , shell is a program which :
Answers:
a. reads a command line from the standard input and interprets it according to a fixed set of rules.
a. is a framework into which functions or utilities can be added when required.
a. is the interface between the user and the kernel.
a. a and b.
a. a and c.
Answers:
a. reads a command line from the standard input and interprets it according to a fixed set of rules.
a. is a framework into which functions or utilities can be added when required.
a. is the interface between the user and the kernel.
a. a and b.
a. 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. “New[abc]”
a. “New[a-c]”
a. “New[^abc]”
a. a or b.
a. b or c.
58. Which of the following statements is incorrect regarding variables?
Answers:
a. Variables have no data type.
a. Variables can be local or global.
a. Variables can be created at the $ prompt or within a shell script.
a. Global variables are created by the global command.
a. Environment variables are created by the shell.
Answers:
a. “New[abc]”
a. “New[a-c]”
a. “New[^abc]”
a. a or b.
a. b or c.
58. Which of the following statements is incorrect regarding variables?
Answers:
a. Variables have no data type.
a. Variables can be local or global.
a. Variables can be created at the $ prompt or within a shell script.
a. Global variables are created by the global command.
a. Environment variables are created by the shell.
59. What is the file descriptor for the standard output file ?
Answers:
a. 0
a. 1
Answers:
a. 0
a. 1
a. 2
a. 3
a. 4
60. Which command invokes a text editor ?
Answers:
a. write
a. edit
a. editor
a. pad
a. vi
a. 3
a. 4
60. Which command invokes a text editor ?
Answers:
a. write
a. edit
a. editor
a. pad
a. vi
61. Which option of the uniq command would you use to display lines with only one occurence?
Answers:
a. -u
a. -d
a. -c
Answers:
a. -u
a. -d
a. -c
a. -l
a. -r
62. What is the default UNIX prompt?
Answers:
a. >
a. !
a. #
a. @
a. $
a. -r
62. What is the default UNIX prompt?
Answers:
a. >
a. !
a. #
a. @
a. $
63. What is the number of standard file pointers in UNIX?
Answers:
a. 3
a. 4
a. 5
a. 6
a. 7
64. In which of the following high level languages most of the UNIX is written?
Answers:
a. C++
a. JAVA
a. PASCAL
a. FORTRAN
a. C
65. Which command is used to run a command at a specified time ?
Answers:
a. timer
a. at
a. time
a. atq
a. dd
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:
a. v1=v2
a. v1=$v2
a. v1=${v2}
a. a or b.
a. b or c.
67. What communication command allows a user to communicate with another user logged on by splitting the screen and providing two way communication ?
Answers:
a. talk
a. write
a. chat
a. talkto
a. transmit
68. The number of arguments can be known by which variable ?
Answers:
a. $-
a. $?
a. $!
a. $#
a. $$
69. UNIX is an example of :
Answers:
a. Batch processing operating system.
a. Time sharing operating system.
a. Real time sharing system.
a. Single user operating system.
a. Assembly language.
70. What information does the who am i command display?
Answers:
a. The user’s name.
a. The user’s terminal file name.
a. The day the user logged in.
a. The time the user logged in.
a. The day the user logged in the last time.
71. You want to declare a variable vs with the value hello. Which of the following declarations is correct ?
Answers:
a. vs = ‘hello’
a. vs=’hello’
a. vs=hello
a. a or b
a. b or c
72. Which of the following is not a filter ?
Answers:
a. sort
a. grep
a. uniq
a. pg
a. echo
73. What is the command that can print lines of 1st file matching with 2nd file ?
Answers:
a. printline
a. cmp
a. com
a. comm
a. prncomm
74. Which file contains the commands run by all users at login?
Answers:
a. /usr/init
a. /usr/profile
a. /usr/startup
a. /etc/startup
a. /etc/profile
75. Which command would you use if you want to display selective fields from a file ?
Answers:
a. pg
a. wc
a. tr
a. cut
a. tee
76. Which filter is used to copy the standard input to the standard output and also to a disk file ?
Answers:
a. grep
a. cut
a. tr
a. wc
a. tee
77. You are writing a shell script.For a given condition, you want to terminate a loop. Which command will you use ?
Answers:
a. terminate
a. end
a. break
a. stop
a. exit
78. The find command :
Answers:
a. searches for specific patterns of characters in file.
a. is used for locating words in a file.
a. Is used to locate files in a directory and in all subdirectories of that directory.
a. can only be used by the administrator.
a. is used for locating users in a network.
79. By which screen manipulation command can you specify the coordinates for the cursor position ?
Answers:
a. tput cup
a. tput smso
a. tput rmso
a. tput blink
a. tput reverse
80. Highlight the incorrect statement regarding the uniq command :
Answers:
a. uniq is a filter.
a. It compares adjacent lines in a sorted file.
a. It can display lines that are unique.
a. It can display lines that are repeated.
a. It automatically sorts the file that is specified.
81. The command
Answers:
a. 3
a. 4
a. 5
a. 6
a. 7
64. In which of the following high level languages most of the UNIX is written?
Answers:
a. C++
a. JAVA
a. PASCAL
a. FORTRAN
a. C
65. Which command is used to run a command at a specified time ?
Answers:
a. timer
a. at
a. time
a. atq
a. dd
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:
a. v1=v2
a. v1=$v2
a. v1=${v2}
a. a or b.
a. b or c.
67. What communication command allows a user to communicate with another user logged on by splitting the screen and providing two way communication ?
Answers:
a. talk
a. write
a. chat
a. talkto
a. transmit
68. The number of arguments can be known by which variable ?
Answers:
a. $-
a. $?
a. $!
a. $#
a. $$
69. UNIX is an example of :
Answers:
a. Batch processing operating system.
a. Time sharing operating system.
a. Real time sharing system.
a. Single user operating system.
a. Assembly language.
70. What information does the who am i command display?
Answers:
a. The user’s name.
a. The user’s terminal file name.
a. The day the user logged in.
a. The time the user logged in.
a. The day the user logged in the last time.
71. You want to declare a variable vs with the value hello. Which of the following declarations is correct ?
Answers:
a. vs = ‘hello’
a. vs=’hello’
a. vs=hello
a. a or b
a. b or c
72. Which of the following is not a filter ?
Answers:
a. sort
a. grep
a. uniq
a. pg
a. echo
73. What is the command that can print lines of 1st file matching with 2nd file ?
Answers:
a. printline
a. cmp
a. com
a. comm
a. prncomm
74. Which file contains the commands run by all users at login?
Answers:
a. /usr/init
a. /usr/profile
a. /usr/startup
a. /etc/startup
a. /etc/profile
75. Which command would you use if you want to display selective fields from a file ?
Answers:
a. pg
a. wc
a. tr
a. cut
a. tee
76. Which filter is used to copy the standard input to the standard output and also to a disk file ?
Answers:
a. grep
a. cut
a. tr
a. wc
a. tee
77. You are writing a shell script.For a given condition, you want to terminate a loop. Which command will you use ?
Answers:
a. terminate
a. end
a. break
a. stop
a. exit
78. The find command :
Answers:
a. searches for specific patterns of characters in file.
a. is used for locating words in a file.
a. Is used to locate files in a directory and in all subdirectories of that directory.
a. can only be used by the administrator.
a. is used for locating users in a network.
79. By which screen manipulation command can you specify the coordinates for the cursor position ?
Answers:
a. tput cup
a. tput smso
a. tput rmso
a. tput blink
a. tput reverse
80. Highlight the incorrect statement regarding the uniq command :
Answers:
a. uniq is a filter.
a. It compares adjacent lines in a sorted file.
a. It can display lines that are unique.
a. It can display lines that are repeated.
a. It automatically sorts the file that is specified.
81. The command
rm -r project
Answers:
a. deletes the file project from the current directory.
a. deletes all the files from the directory project.
a. recursively deletes the directory project and all its subdirectories.
a. deletes the file project found in all directories.
a. is invalid.
82. You want to specifically search for the character [ . What character(s) would you use in the expression to achieve this ?
Answers:
a. []
a. ^
a. .
a. \
a. $
83. Which screen manipulation command sets the screen back to normal?
Answers:
a. tput cup
a. tput smso
a. tput rmso
a. tput blink
a. tput reverse
84. Which character of the grep filter specifies that the pattern preceding it must occur at the end of each line ?
Answers:
a. []
a. ^
a. $
a. .
a. \
85. Which option of the grep filter prints out all those lines that do not match the pattern specified by the regular expression ?
Answers:
a. -n
a. -c
a. -d
a. -l
a. -v
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:
a. []
a. ^
a. $
a. .
a. \
87. The user passwords are kept in which file on most Unix systems?
Answers:
a. /etc/passwd
a. /etc/password
a. /usr/password
a. /bin/passwd
a. /system/password
88. Which option of the sort filter folds lower case characters to upper case ?
Answers:
a. -r
a. -f
a. -n
a. -t
a. -o
89. Which file contains the commands that the system executes when a user logs in?
Answers:
a. $HOME/startup
a. user/init
a. $HOME/.profile
a. etc/startup
90. The executable file name for the Bourne shell is :
Answers:
a. bsh
a. sh
a. csh
a. ksh
a. lsh
91. By which command a user can add a password for his login name?
Answers:
a. passwd
a. pass
a. chpass
a. password
a. setpass
92. Which of the following is the only filter?
Answers:
a. echo
a. wc
a. mv
a. rm
93. Consider the following file listing of file abc1 for a user abc
Answers:
a. deletes the file project from the current directory.
a. deletes all the files from the directory project.
a. recursively deletes the directory project and all its subdirectories.
a. deletes the file project found in all directories.
a. is invalid.
82. You want to specifically search for the character [ . What character(s) would you use in the expression to achieve this ?
Answers:
a. []
a. ^
a. .
a. \
a. $
83. Which screen manipulation command sets the screen back to normal?
Answers:
a. tput cup
a. tput smso
a. tput rmso
a. tput blink
a. tput reverse
84. Which character of the grep filter specifies that the pattern preceding it must occur at the end of each line ?
Answers:
a. []
a. ^
a. $
a. .
a. \
85. Which option of the grep filter prints out all those lines that do not match the pattern specified by the regular expression ?
Answers:
a. -n
a. -c
a. -d
a. -l
a. -v
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:
a. []
a. ^
a. $
a. .
a. \
87. The user passwords are kept in which file on most Unix systems?
Answers:
a. /etc/passwd
a. /etc/password
a. /usr/password
a. /bin/passwd
a. /system/password
88. Which option of the sort filter folds lower case characters to upper case ?
Answers:
a. -r
a. -f
a. -n
a. -t
a. -o
89. Which file contains the commands that the system executes when a user logs in?
Answers:
a. $HOME/startup
a. user/init
a. $HOME/.profile
a. etc/startup
90. The executable file name for the Bourne shell is :
Answers:
a. bsh
a. sh
a. csh
a. ksh
a. lsh
91. By which command a user can add a password for his login name?
Answers:
a. passwd
a. pass
a. chpass
a. password
a. setpass
92. Which of the following is the only filter?
Answers:
a. echo
a. wc
a. mv
a. rm
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:
a. The group have full permissions.
a. Only the owner has full permissions.
a. Only the owner has read and write but no execute permissions.
a. The group has read and write permissions.
a. Others have read and write permissions.
94. Which command gives all differences between two files ?
Answers:
a. filecmp
a. filecompare
a. filediff
a. diff
95. Which of the following shells is typically used for guest logins and in secure systems ?
Answers:
a. sh
a. csh
a. ksh
a. rsh
a. lsh
96. Which option of the sort filter changes the output to reverse order ?
Answers:
a. -r
a. -f
a. -n
a. -t
a. -o
97. Which of the following is not a valid file command ?
Answers:
a. ls
a. cat
a. mv
a. cp
a. break
98. Which wild-card matches one character ?
Answers:
a. *
a. –
a. #
a. ?
a. @
99. A single command which lists all files in a directory, distinguishing between a directory, executable and symbolic link files is:
Answers:
a. ls -l
a. ls -F
a. ls -o
a. ls -r
a. ls -h
100. What would be displayed on the screen if the pwd command is entered when the user is in /usr directory?
Answers:
a. /
a. home
a. /home/username
a. usr/
a. usr>
a. usr/username
101. Which of the following statements is incorrect regarding positional parameters ?
Answers:
a. They are used to create generalised scripts.
a. There can be a maximum number of 9 variables.
a. The shift command is used when the number of parameters exceeds 9 to shift the values of variables.
a. Depending upon the number of arguments specified in the command line, the shell will assign values to some or all of the positional parameters.
a. 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:
a. By looking in the etc/passwd
a. By using passwd command
a. It is not possible
a. None of the above
103. Which of the following statements is incorrect regarding the UNIX environment?
Answers:
a. It has the provision of security through the login and passwd programs.
a. In it the file names are not case insensitive.
a. It has the provision of various commands and utilities for file and directory manipulation.
a. It does not allow relative path names.
a. It allows the use of wild-card characters for file-name expansion.
104. Which command is used for splitting a file horizontally?
Answers:
a. cut
a. head
a. tail
a. b and c
a. a, b and c
105. Which of the following is a responsibility of the system administrator?
Answers:
a. Setting permissions for files and directories
a. Creation of users and group-ids
a. Providing security through the use of passwords
a. a and c
a. a,b and c
106. The shell variable that defines internal field separator is.
Answers:
a. PS1
a. PATH
a. HOME
a. LOGNAME
a. IFS
107. Which of the following statements is not true regarding the grep filter?
Answers:
a. It is used to seach a file for a particular pattern of characters and displays all lines that contain that pattern.
a. The pattern that is searched for in the file is referred to as the regular expression.
a. grep can be used without specifying a regular expression.
a. The filenames are optional.In this case grep expects standard input.
a. The -c option prints only a count of the lines that match the pattern.
108. What control character signals the end of the file ?
Answers:
a. Ctrl+a
a. Ctrl+b
a. Ctrl+c
a. Ctrl+d
a. Ctrl+e
109. Which command will you use to see the available routes and their status?
Answers:
a. show route
a. route status
a. netstat -rn
a. None of the above
110. Which error will you see when an NFS client can no longer access mounted file system?
Answers:
a. File Not Found
a. Stale File Handle
a. Invalid Command
a. File Inaccessible
111. What is the user id of a root user?
Answers:
a. 0
a. 1
a. 2
a. 3
Answers:
a. The group have full permissions.
a. Only the owner has full permissions.
a. Only the owner has read and write but no execute permissions.
a. The group has read and write permissions.
a. Others have read and write permissions.
94. Which command gives all differences between two files ?
Answers:
a. filecmp
a. filecompare
a. filediff
a. diff
95. Which of the following shells is typically used for guest logins and in secure systems ?
Answers:
a. sh
a. csh
a. ksh
a. rsh
a. lsh
96. Which option of the sort filter changes the output to reverse order ?
Answers:
a. -r
a. -f
a. -n
a. -t
a. -o
97. Which of the following is not a valid file command ?
Answers:
a. ls
a. cat
a. mv
a. cp
a. break
98. Which wild-card matches one character ?
Answers:
a. *
a. –
a. #
a. ?
a. @
99. A single command which lists all files in a directory, distinguishing between a directory, executable and symbolic link files is:
Answers:
a. ls -l
a. ls -F
a. ls -o
a. ls -r
a. ls -h
100. What would be displayed on the screen if the pwd command is entered when the user is in /usr directory?
Answers:
a. /
a. home
a. /home/username
a. usr/
a. usr>
a. usr/username
101. Which of the following statements is incorrect regarding positional parameters ?
Answers:
a. They are used to create generalised scripts.
a. There can be a maximum number of 9 variables.
a. The shift command is used when the number of parameters exceeds 9 to shift the values of variables.
a. Depending upon the number of arguments specified in the command line, the shell will assign values to some or all of the positional parameters.
a. 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:
a. By looking in the etc/passwd
a. By using passwd command
a. It is not possible
a. None of the above
103. Which of the following statements is incorrect regarding the UNIX environment?
Answers:
a. It has the provision of security through the login and passwd programs.
a. In it the file names are not case insensitive.
a. It has the provision of various commands and utilities for file and directory manipulation.
a. It does not allow relative path names.
a. It allows the use of wild-card characters for file-name expansion.
104. Which command is used for splitting a file horizontally?
Answers:
a. cut
a. head
a. tail
a. b and c
a. a, b and c
105. Which of the following is a responsibility of the system administrator?
Answers:
a. Setting permissions for files and directories
a. Creation of users and group-ids
a. Providing security through the use of passwords
a. a and c
a. a,b and c
106. The shell variable that defines internal field separator is.
Answers:
a. PS1
a. PATH
a. HOME
a. LOGNAME
a. IFS
107. Which of the following statements is not true regarding the grep filter?
Answers:
a. It is used to seach a file for a particular pattern of characters and displays all lines that contain that pattern.
a. The pattern that is searched for in the file is referred to as the regular expression.
a. grep can be used without specifying a regular expression.
a. The filenames are optional.In this case grep expects standard input.
a. The -c option prints only a count of the lines that match the pattern.
108. What control character signals the end of the file ?
Answers:
a. Ctrl+a
a. Ctrl+b
a. Ctrl+c
a. Ctrl+d
a. Ctrl+e
109. Which command will you use to see the available routes and their status?
Answers:
a. show route
a. route status
a. netstat -rn
a. None of the above
110. Which error will you see when an NFS client can no longer access mounted file system?
Answers:
a. File Not Found
a. Stale File Handle
a. Invalid Command
a. File Inaccessible
111. What is the user id of a root user?
Answers:
a. 0
a. 1
a. 2
a. 3
No comments:
Post a Comment