hassy saade
Test por , creado hace más de 1 año

test 2 UNIX Test sobre UNIX - QUIZ 5, creado por hassy saade el 24/09/2018.

17
1
0
hassy saade
Creado por hassy saade hace más de 7 años
Cerrar

UNIX - QUIZ 5

Pregunta 1 de 40

1


[Korn08] The priority of a running process can be changed using ____.

Selecciona una de las siguientes respuestas posibles:

  • priority

  • renice

  • priority cannot be changed for a running process

  • only superuser can change the priority

  • ps

Explicación

Pregunta 2 de 40

1


[Korn08] A Command to get your userid is ____.

Selecciona una de las siguientes respuestas posibles:

  • who am i

  • who

  • user

  • uname

  • userid

Explicación

Pregunta 3 de 40

1


[Korn08] Which of the following signals cannot be handled or ignored?

Selecciona una de las siguientes respuestas posibles:

  • SIGINT

  • SIGCHLD

  • SIGKILL

  • SIGALRM

  • SIGURG

Explicación

Pregunta 4 de 40

1


[Korn08] Default action of SIGSEGV is _____

Selecciona una de las siguientes respuestas posibles:

  • Get into Debugging Mode

  • Start Core dump

  • Initiate System Shutdown

  • Ignore the signal

  • Log off Owner of Process

Explicación

Pregunta 5 de 40

1


[Korn08] Which command/tool is used for building and maintaining groups of programs from source code?

Selecciona una de las siguientes respuestas posibles:

  • autotool

  • make

  • run

  • compile

  • gcc

Explicación

Pregunta 6 de 40

1


[Korn08] Process attributes are stored in ___

Selecciona una de las siguientes respuestas posibles:

  • file table

  • list table

  • process table

  • function table

  • kernel table

Explicación

Pregunta 7 de 40

1

[Korn08] To show only the current month-name is: ____

Selecciona una de las siguientes respuestas posibles:

  • date

  • date +%m

  • date +%h

  • date +”%h %m"

  • date –m

Explicación

Pregunta 8 de 40

1

[Korn08] Which command is used to display (and update) a dynamic list of currently running processes of a system in real-time?

Selecciona una de las siguientes respuestas posibles:

  • ps

  • top

  • lun

  • plist

  • status

Explicación

Pregunta 9 de 40

1


[Korn08] Which command is used to display lines of source code in gdb debugger?

Selecciona una de las siguientes respuestas posibles:

  • display

  • display m,n

  • list

  • print

  • next

Explicación

Pregunta 10 de 40

1


[Korn08] If a program executing in background attempts to read from the default STDIN (that is, keyboard), then ____

Selecciona una de las siguientes respuestas posibles:

  • It will be terminated.

  • Its execution will be suspended

  • Requesting STDIN to be made available.

  • Core Dump will be initiated

  • The input will be set to EOF.

Explicación

Pregunta 11 de 40

1

[Korn08] Which command is used to update the files in CVS?

Selecciona una de las siguientes respuestas posibles:

  • init

  • update

  • commit

  • add

  • finalize

Explicación

Pregunta 12 de 40

1

[Korn08] Which command option (of ar command) is used to add a file to the library?

Selecciona una de las siguientes respuestas posibles:

  • ar –r

  • ar –add

  • ar –d

  • ar –q

  • ar –ad

Explicación

Pregunta 13 de 40

1


[Korn08] When parent process doesn’t wait till child’s death, the child enters into ____

Selecciona una de las siguientes respuestas posibles:

  • orphan state

  • zombie state

  • parent state

  • child state

  • dead state

Explicación

Pregunta 14 de 40

1


[Korn08] Which mode of the gdb debugger ascertains the cause of the crash by examining the core files?

Selecciona una de las siguientes respuestas posibles:

  • Debug mode

  • Attach mode

  • Post-mortem mode

  • Pre-run mode

  • Break mode

Explicación

Pregunta 15 de 40

1

[Korn08] Which one of the following methods is NOT correct for two processes to communicate each other?

Selecciona una de las siguientes respuestas posibles:

  • pipe

  • message queue

  • shared memory

  • socket

  • livespot

Explicación

Pregunta 16 de 40

1


[Korn08] What is the output of the below code?

void exit_handler1();
void exit_handler2();

int main() {
int pid;
atexit(exit_handler1);
atexit(exit_handler2);
pid = fork();
if(pid == 0) {
_exit(0);
} else {
sleep(2);
exit(0);
}
return 0;
}

Selecciona una de las siguientes respuestas posibles:

  • Only child executes the exit_handler1 and exit_handler2.

  • Only parent executes the exit_handler1 and exit_handler2.

  • Both parent and child executes the exit_handler1 and exit_handler2.

  • Neither parent nor child executes the exit_handler1 and exit_handler2

  • Only parent executes the exit_handler1 only

  • Only parent executes the exit_handler2 only.

Explicación

Pregunta 17 de 40

1


[Korn08] This points out the one which is not a section of "man" page.

Selecciona una de las siguientes respuestas posibles:

  • NAME

  • SYNOPSIS

  • DESCRIPTION

  • BRIEF

Explicación

Pregunta 18 de 40

1


[Korn08] There is a variable “var”. Its value is set to the number 5. If one tries to print “The value: 5”. Which one of the commands will do that?

Selecciona una de las siguientes respuestas posibles:

  • echo "The value: $var"

  • echo "The value: `$var"

  • echo 'The value: $var'

  • echo "The value: var"

  • echo The value: $var

Explicación

Pregunta 19 de 40

1


[Korn08] A Command to get the version or release of your operating system is ____.

Selecciona una de las siguientes respuestas posibles:

  • uname -k

  • uname –v

  • uname –r

  • uname –n

  • uname –l

Explicación

Pregunta 20 de 40

1


[Korn08] A Graphical User Interface supported by every Unix system is generally known as ____.

Selecciona una de las siguientes respuestas posibles:

  • Desktop Windows

  • Advanced Window System

  • Microsoft Windows

  • X Windows

  • Common Desktop System

Explicación

Pregunta 21 de 40

1


[Korn08] A new line (in echo) will be done with this ___.

Selecciona una de las siguientes respuestas posibles:

  • \a

  • \c

  • \n

  • \f

  • \t

Explicación

Pregunta 22 de 40

1


[Korn08] Mark one (of the choices below) which is not a help facility.

Selecciona una de las siguientes respuestas posibles:

  • man

  • about

  • info

  • ––help

Explicación

Pregunta 23 de 40

1


[Korn08] The directory “a” contains its subdirectory “b” and there is no other entry in the directory "a". You want to display “the contents of directory a are: b”. The contents are to be displayed using "ls" command. Which command helps you accomplish that?

Selecciona una de las siguientes respuestas posibles:

  • echo 'The contents of directory a are: "ls a"

  • echo "The contents of directory a are: `ls a`"

  • echo "The contents of directory a are: ls a"

  • echo 'The contents of directory a are: `ls a`'

  • echo "The contents of directory a are: " ls a

Explicación

Pregunta 24 de 40

1


[Korn08] Mail utility that POSIX requires all unix systems to support is ____.

Selecciona una de las siguientes respuestas posibles:

  • email

  • mailx

  • mbox

  • mailbox

  • outlook

Explicación

Pregunta 25 de 40

1


[Korn08] This command shows which version of a particular command(example: echo) will be executed.

Selecciona una de las siguientes respuestas posibles:

  • type echo

  • which echo

  • whichis echo

  • whereis echo

  • about echo

Explicación

Pregunta 26 de 40

1


[Korn08] How many times printf() is executed in the following program code?

main() {
for (int i=0;i<3;i++) fork();
printf(“pid= %d\n”,getpid());
}

Selecciona una de las siguientes respuestas posibles:

  • 4

  • 8

  • 16

  • 32

  • 64

Explicación

Pregunta 27 de 40

1


[Korn08] Which of the following values for STAT (status) column of ps command is NOT correct?

Selecciona una de las siguientes respuestas posibles:

  • status R means running or runnable

  • Status S means sleeping (wait for an event complete)

  • Status E means exited

  • Status Z means defunct

  • Status X for dead

Explicación

Pregunta 28 de 40

1


[Korn08] The delimiter (to separates one piece of path name from other path name) in PATH variable is ___

Selecciona una de las siguientes respuestas posibles:

  • semicolon (";")

  • colon (":")

  • period (".")

  • comma (",")

  • vertical bar ("|")

Explicación

Pregunta 29 de 40

1

[Korn08] Which is NOT a version control tool used in UNIX?

Selecciona una de las siguientes respuestas posibles:

  • git

  • RCS

  • CVS

  • cygwin

  • SVN

Explicación

Pregunta 30 de 40

1

[Korn08] What is not an advantage or a feature of CVS?

Selecciona una de las siguientes respuestas posibles:

  • CVS can handle group of files

  • CVS can let two or more users concurrently change files

  • CVS can be used over network

  • CVS can manage well a complex distributed source control

  • CVS is a source control system

Explicación

Pregunta 31 de 40

1


[Korn08] PID of init process is ___

Selecciona una de las siguientes respuestas posibles:

  • 1

  • 2

  • -1

  • 1000

  • depends on each startup

Explicación

Pregunta 32 de 40

1


[Korn08] A Command to record your session is ____.

Selecciona una de las siguientes respuestas posibles:

  • record

  • cp

  • script

  • save

  • log

Explicación

Pregunta 33 de 40

1

[Korn08] ps fetches attributes from ___

Selecciona una de las siguientes respuestas posibles:

  • file table

  • list table

  • process table

  • function table

  • kernel table

Explicación

Pregunta 34 de 40

1


[Korn08] A user issues the following command sequence:

$ a.out &
$ bash
$ a.out &

If the user kills the bash process, then which of the following is true?

Selecciona una de las siguientes respuestas posibles:

  • The second a.out process is also terminated

  • The second a.out process becomes a defunct process

  • The first a.out process becomes a zombie process

  • init process becomes parent of second a.out process

  • The user will be logged out

Explicación

Pregunta 35 de 40

1


[Korn08] Which command in debugger is used to execute the next statement but descends into a function?

Selecciona una de las siguientes respuestas posibles:

  • cont

  • break

  • next

  • step

  • hex

Explicación

Pregunta 36 de 40

1


[Korn08] Consider the following program code. How many times will it output "Hello"?

main() {
fork( ); fork( ); fork( ); fork( );
printf("Hello");
}

Selecciona una de las siguientes respuestas posibles:

  • 4

  • 8

  • 16

  • 32

  • 64

Explicación

Pregunta 37 de 40

1


[Korn08] A Command used for changing user password is ____.

Selecciona una de las siguientes respuestas posibles:

  • passwd

  • chmod

  • chown

  • chpass

Explicación

Pregunta 38 de 40

1

[Korn08] Which command is used to check out the files in RCS?

Selecciona una de las siguientes respuestas posibles:

  • co –l

  • ci –l

  • get -f

  • rlog

  • check -file

Explicación

Pregunta 39 de 40

1


[Korn08] ___ creates a process by spawning a process.

Selecciona una de las siguientes respuestas posibles:

  • exec

  • fork

  • process

  • create

  • split

Explicación

Pregunta 40 de 40

1

[Korn08] A Command to display current terminal settings is ____.

Selecciona una de las siguientes respuestas posibles:

  • sty –all

  • stty –a

  • stty intr DEL

  • stty erase [Backspace]

  • sty –term

Explicación