0

operating systems Online Quiz - 2

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

Windows provides more security and flexibility than Linux?

  1. True

  2. False


Correct Option: B

The most popular shell for unix till date is:

  1. Bourne

  2. Bash

  3. C shell

  4. Korn shell


Correct Option: B

Which command lets you change back to the last working directory?

  1. cd -

  2. cd ~

  3. cd ..

  4. cd .


Correct Option: A
  1. chmod u+c filename

  2. chmod g+x filename

  3. chmod og-rx filename

  4. chmod o+x filename


Correct Option: D

Which command is used to display the contents of a file named "TEST" in reverse order?

  1. cat -r TEST;

  2. tac TEST

  3. rev TEST

  4. cat -R TEST


Correct Option: B

An alternative to ls command

  1. dir

  2. list

  3. echo *

  4. cat


Correct Option: C

AI Explanation

To answer this question, we need to understand the purpose of the "ls" command and compare it to the alternative options provided.

The "ls" command is used in Unix-like operating systems to list the files and directories in a directory. It provides information such as file names, permissions, sizes, and timestamps.

Let's go through each option to understand why it is correct or incorrect:

Option A) dir - This option is incorrect because "dir" is the equivalent command in Windows operating systems, not in Unix-like systems.

Option B) list - This option is incorrect because there is no "list" command in Unix-like operating systems.

Option C) echo * - This option is correct because "echo " will display the names of all the files and directories in the current directory, similar to the "ls" command. The asterisk () is a wildcard that represents all files and directories.

Option D) cat - This option is incorrect because the "cat" command is used to display the contents of a file, not to list files and directories.

The correct answer is Option C) echo *. This option is correct because it provides an alternative way to list the files and directories in the current directory, similar to the "ls" command.

What will the following command do where foo and foo1 are both directories? rm ./foo ./foo/foo1

  1. Delete foo

  2. Delete foo and foo1

  3. Produce an error

  4. None of the above


Correct Option: C

How to display only hidden files in UNIX?

  1. ls -a

  2. ls -a|grep "^."

  3. ls -a|grep "^."

  4. ls -ltra


Correct Option: C

How many prompts are available in a UNIX system?

  1. 0

  2. 1

  3. 2

  4. 3


Correct Option: C

How do you find out the number of arguments passed to the shell script?

  1. $*

  2. $@

  3. $#

  4. $?


Correct Option: C
- Hide questions