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
  1. ALT+ #

  2. ALT+ $

  3. ALT+' (apostrophe)

  4. ALT+" (quotation mark)


Correct Option: C
  1. CTRL+ 1

  2. CTRL+ 2

  3. CTRL+ 3

  4. CTRL+ 4


Correct Option: A
  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
  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
  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 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

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
  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
  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
  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 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