Skip to content
GK24
Computer AwarenessMedium

Which of the following statements about MS-DOS and Linux is correct?

  1. A.Both are case sensitive in command and file names
  2. B.MS-DOS is multi-user while Linux is single-user
  3. C.Linux is case sensitive and multi-user while MS-DOS is neither
  4. D.Both use the backslash as the separator in a path

Correct answer

C. Linux is case sensitive and multi-user while MS-DOS is neither

Explanation

The correct answer is C. Linux treats upper and lower case as different, so a file named Report is not the same as report, and it is built as a multi-user, multitasking system in which several accounts can work at once with separate permissions and a login. MS-DOS ignores case and is a single-user, single-tasking system with no login at all in its plain form. Option A is wrong because MS-DOS is not case sensitive; DIR and dir do the same thing. Option B is wrong because it reverses the fact, since it is Linux that supports many users. Option D is wrong because the backslash is the DOS separator while Linux uses the forward slash, and in Linux the backslash instead marks an escape character. Two further differences are worth holding: MS-DOS is proprietary and discontinued, whereas Linux is free and open source under the GNU General Public Licence.

Read the full article: MS-DOS and Linux Commands: Internal, External and Shell

View all
Q1.Computer AwarenessEasy

Which of the following is an internal command of MS-DOS?

  1. A.FORMAT
  2. B.CHKDSK
  3. C.DIR
  4. D.XCOPY
Show answer
Correct answer: C. DIR

Explanation

The correct answer is C, DIR. An internal command is written into the command interpreter COMMAND.COM and is loaded into memory along with the operating system, so it can be used even when no separate program file is present on the disk. DIR, which lists the files and sub-directories of a directory, belongs to this group along with CD, MD, RD, COPY, DEL, REN, TYPE, CLS, DATE, TIME, VER, VOL, PATH and PROMPT. Option A is wrong because FORMAT, which prepares a disk by creating tracks and sectors and writing the file allocation table, exists as its own executable file and is therefore external. Option B is wrong because CHKDSK, which checks a disk for errors and reports free space, is also a separate executable. Option D is wrong because XCOPY, the extended copy command that can copy whole directory trees, is likewise an external command. Papers usually ask this question by listing three external commands and one internal one.

Q2.Computer AwarenessEasy

Which Linux command displays the full path of the directory you are currently working in?

  1. A.ls
  2. B.pwd
  3. C.cd
  4. D.path
Show answer
Correct answer: B. pwd

Explanation

The correct answer is B, pwd. The name stands for print working directory, and the command prints the complete path of the directory in which the shell is placed at that moment, counted from the root directory written as a single forward slash. Option A is wrong because ls lists the names of the files and sub-directories inside a directory but does not say where that directory sits in the tree. Option C is wrong because cd changes the directory; in Linux, typing cd with no argument takes the user to the home directory rather than printing the current path, which is a point of difference from MS-DOS, where CD alone displays the current directory. Option D is wrong because path is not a Linux command of this kind; PATH in MS-DOS and the PATH variable in Linux hold the list of directories searched for programs, which is a different idea altogether.

Q3.Computer AwarenessEasy

The MS-DOS command TYPE, which displays the contents of a text file on the screen, corresponds to which Linux command?

  1. A.cat
  2. B.touch
  3. C.echo
  4. D.grep
Show answer
Correct answer: A. cat

Explanation

The correct answer is A, cat. The cat command, short for concatenate, writes the contents of one or more files to the standard output, which is normally the screen, and so does the work of TYPE in MS-DOS. It can also join files together when more than one name is given. Option B is wrong because touch creates an empty file if the name does not exist and otherwise only updates the time stamp of the file; it never shows the contents. Option C is wrong because echo prints the text or the value of a variable written after it, not the contents of a file. Option D is wrong because grep searches for a pattern and prints only the lines that match it, which makes it the equivalent of the DOS command FIND rather than of TYPE. For long files, less and more are used instead of cat so that the text can be read one screen at a time.

Q4.Computer AwarenessEasy

Who developed the first Linux kernel, and in which year was it released?

  1. A.Dennis Ritchie, 1972
  2. B.Richard Stallman, 1983
  3. C.Linus Torvalds, 1991
  4. D.Ken Thompson, 1969
Show answer
Correct answer: C. Linus Torvalds, 1991

Explanation

The correct answer is C, Linus Torvalds, 1991. Torvalds, then a student at the University of Helsinki in Finland, wrote a free kernel for personal computers and released it in 1991 under the GNU General Public Licence, which allowed anyone to study, change and redistribute it. Option A is wrong because Dennis Ritchie is remembered for the C language, which he created at Bell Laboratories in the early nineteen seventies, and for his work on Unix. Option B is wrong because Richard Stallman began the GNU project in 1983 and wrote the General Public Licence; the GNU tools wrapped around the Linux kernel make the complete system, which is why it is also called GNU/Linux. Option D is wrong because Ken Thompson, with Dennis Ritchie, developed Unix at Bell Laboratories in 1969, the ancestor that Linux was written to resemble.

Q5.Computer AwarenessMedium

In Linux, the command chmod 777 on a file gives which set of permissions?

  1. A.Read and write to the owner only
  2. B.Read, write and execute to the owner, the group and others
  3. C.Read and execute to everyone, write to nobody
  4. D.Execute to the owner, read to the group, nothing to others
Show answer
Correct answer: B. Read, write and execute to the owner, the group and others

Explanation

The correct answer is B. In the numeric form of chmod each of the three digits stands for one set of users, in the order owner, group and others, and each digit is the sum of read as 4, write as 2 and execute as 1. Since 4 plus 2 plus 1 is 7, the number 777 grants all three rights to all three sets, which is the widest permission a file can carry and is therefore avoided on shared systems. Option A is wrong because read and write for the owner alone is 600. Option C is wrong because read and execute for everyone with write for nobody is 555. Option D is wrong because such a mixture would be written as a different combination altogether, for example 140, and is not what 777 means. Two other numbers are worth remembering: 755 for programs and directories and 644 for ordinary documents.