0

operating systems Online Quiz - 53

Description: operating systems Online Quiz - 53
Number of Questions: 20
Created by:
Tags: operating systems
Attempted 0/20 Correct 0 Score 0

key to Display the Style dialog box

  1. ALT+ #

  2. ALT+ $

  3. ALT+' (apostrophe)

  4. ALT+" (quotation mark)


Correct Option: C

to Display the Format Cells dialog box

  1. CTRL+ 1

  2. CTRL+ 2

  3. CTRL+ 3

  4. CTRL+ 4


Correct Option: A

Apply the Percentage format with no decimal places

  1. CTRL+SHIFT+$

  2. CTRL+SHIFT+#

  3. CTRL+SHIFT+%

  4. CTRL+SHIFT+@


Correct Option: C

Apply the Date format with the day, month, and year

  1. CTRL+SHIFT+@

  2. CTRL+SHIFT+!

  3. CTRL+SHIFT+$

  4. CTRL+SHIFT+#


Correct Option: D

Apply the Time format with the hour and minute, and AM or PM

  1. CTRL+SHIFT+%

  2. CTRL+SHIFT+@

  3. CTRL+SHIFT+!

  4. CTRL+SHIFT+$


Correct Option: A

Apply the Number format with two decimal places, thousands separator, and minus sign (–) for negative values

  1. CTRL+SHIFT+!

  2. CTRL+SHIFT+$

  3. CTRL+SHIFT+@

  4. CTRL+SHIFT+%


Correct Option: A

I have a script named test.sh and the contents are as follows: $ cat test.sh echo hi rm -f test.sh echo hi ######## What will be the output of the following comand: $ sh test.sh

  1. the first 'hi' will be displayed but it will say "Could not delete file: in use" and will exit the script

  2. the first 'hi' will be displayed but it will say "Could not delete file: in use" and will then echo the second 'hi'

  3. The script will display 2 'hi' and the file will also be deleted

  4. The first 'hi' will be displayed, the script will be deleted , but the 2nd 'hi' will not be displayed.


Correct Option: C

I have a file named "-p" in my home directory. Which of the following commands will be used to delete this file?

  1. rm -p

  2. rm -f -p

  3. rm -f -- -p

  4. rm -f "-p"


Correct Option: C

I want to change the date of my linux server to 'Mon Nov 23 18:08:07 IST 2009'. Which of the following commands wil help?(ignore the seconds in the date)

  1. a) date 1123180809

  2. b) date 2311180809

  3. c) date -s "Mon Nov 23 18:08:07 IST 2009"

  4. d) Both a and c


Correct Option: D

A script is executing since last 10 minutes and is expected to take another 10 minutes. So I decide to send it to background. Which of the following steps will do it?

  1. Press Ctrl-Z and type "bg"

  2. Press Ctrl-D and type "bg"

  3. Open a new termial and type "bg " where is the pid of that script

  4. None of these


Correct Option: A

I want to send a file as an attachment to my mailserver from my unix server using mailx. Which of the following will help me create the file as attachment?

  1. uuencode coomand

  2. attach command

  3. compress command

  4. Its not possilble to send attachment from unix


Correct Option: A

What is the output of the following command in bash shell on Linux? $ i=2 $ [ $i -lt 2 ] || echo great

  1. great

  2. no output

  3. test: syntax error

  4. we will have to export the value of i


Correct Option: A

Find the output of the last echo command: $ pwd /home/guest $ cat test.sh export i=100 $ sh test.sh $ echo $i

  1. 100

  2. blanck line

  3. No such variable $i

  4. None of these


Correct Option: B

What is the output of the following command? $ cd -

  1. change to home directory

  2. change directory to last directory as saved in the environment variable OLDPWD

  3. move to the last directory of that structure

  4. None of these


Correct Option: B

The password of an unix user can be changed by the following command:

  1. passwd

  2. passwd and pwdadm

  3. pwdadm

  4. password


Correct Option: B

What does this command show? $ echo $TZ

  1. The DayLight Saving Time

  2. The Time zone

  3. blanck line

  4. You will have to set the value of TZ variable first


Correct Option: B

What is the advantage of grep over awk with reference to decision-making scripts?

  1. grep shows different values for $? while awk always shows $?=0

  2. grep is faster and works on rows level

  3. awk can only work on field level

  4. grep has -i option which can be used for ignoring case.


Correct Option: A

What is the command to check all active volume groups on AIX?

  1. lsvg

  2. lsvg -o

  3. lsvg -a

  4. activevg


Correct Option: B

What is the output of the above command?

  1. 3*2

  2. 6

  3. syntax error

  4. Blanck Line


Correct Option: A

What is the command to execute the executable script test.sh in the current shell?

  1. ./test.sh

  2. . test.sh

  3. sh test.sh

  4. exec test.sh


Correct Option: B

AI Explanation

To execute the executable script test.sh in the current shell, the correct command is:

B. . test.sh

Explanation:

Option A) ./test.sh - This option is incorrect because it uses the dot slash notation to execute the script in a subshell, not the current shell.

Option B) . test.sh - This option is correct. The dot command, also known as the source command, is used to execute a script in the current shell. When you use the dot command followed by a space and the script name, it executes the script in the current shell environment.

Option C) sh test.sh - This option is incorrect because it runs the script using the sh command, which launches a new shell to execute the script.

Option D) exec test.sh - This option is incorrect because the exec command is used to replace the current shell process with the specified command. In this case, it would replace the shell with the execution of the test.sh script, which is not the desired behavior.

The correct answer is B. The command ". test.sh" is used to execute the executable script test.sh in the current shell.

- Hide questions