Core9X
Log inSign up

MBOSE Class X Computer Science · Chapter 2

DOS and Linux Commands

Live now

Learn to control a computer by typing commands, managing files and folders in MS-DOS and in the Linux terminal.

16 lessons · 107 practice questions

Start freeLog inSign up free: the first chapter of every subject is open.

What this chapter covers

  • MS-DOS: prompt, files, paths and wildcards
  • Internal and external commands with switches
  • Linux: terminal, shell, file and directory commands, sudo, man

Key terms

command

Meaning: instruction typed at the prompt

Example: DIR

prompt

Meaning: sign showing the computer is ready

Example: C:\>

file extension

Meaning: letters after the dot showing file type

Example: .TXT

directory

Meaning: folder holding files

Example: SCHOOL

root directory

Meaning: top directory of a drive

Example: C:\ or /

subdirectory

Meaning: directory inside another

Example: CLASSX

path

Meaning: route to a file

Example: C:\SCHOOL\NOTES.TXT

wildcard

Meaning: symbol standing for unknown characters

Example: *, ?

switch

Meaning: option added to a command

Example: /S

internal command

Meaning: built into COMMAND.COM

Example: DIR

external command

Meaning: separate program file on disk

Example: FORMAT

attribute

Meaning: property of a file

Example: read-only, hidden

Important questions with answers

10 of the 107 questions on this chapter, solved.

  1. Question 1 · Multiple choice · 1 mark

    The top directory of a drive is called the

    • (a) subdirectory
    • (b) root directory
    • (c) parent file
    • (d) extension

    Answer: (b) root directory

    In DOS it is written C:\; in Linux, /.

  2. Question 2 · Multiple choice · 1 mark

    DISKCOMP is used to

    • (a) format a disk
    • (b) copy a disk
    • (c) compare two disks
    • (d) check a disk for errors

    Answer: (c) compare two disks

    DISKCOPY duplicates a disk.

  3. Question 3 · Multiple choice · 1 mark

    The command DEL TEMP\*.JPG will

    • (a) delete all JPG files in the TEMP directory
    • (b) delete the TEMP directory
    • (c) copy all JPG files
    • (d) rename the JPG files

    Answer: (a) delete all JPG files in the TEMP directory

    MBOSE SSLC 2024, Q6(b)(ii).

  4. Question 4 · Multiple choice · 1 mark

    The Linux command to delete an empty directory FOLDER is

    • (a) rmdir FOLDER
    • (b) mkdir FOLDER
    • (c) rm -a FOLDER
    • (d) del FOLDER

    Answer: (a) rmdir FOLDER

    MBOSE SSLC 2022, Q6(b)(iii).

  5. Question 5 · Assertion and reason · 1 mark

    Assertion (A): Internal DOS commands work without loading any extra file.

    Reason (R): Internal commands are built into COMMAND.COM, which stays in memory.

    • (a) Both A and R are true, and R is the correct explanation of A.
    • (b) Both A and R are true, but R is not the correct explanation of A.
    • (c) A is true, but R is false.
    • (d) A is false, but R is true.

    Answer: (a) Both A and R are true, and R is the correct explanation of A.

    Being in memory, they run at once.

  6. Question 6 · Short answer · 2 marks

    Differentiate between internal and external DOS commands.

    Answer

    Internal commands are built into COMMAND.COM and stay in memory (DIR); external commands are separate files on disk (FORMAT).

  7. Question 7 · Short answer · 2 marks

    What is a path? Give an example.

    Answer

    The route to a file through directories, e.g. C:\SCHOOL\NOTES.TXT.

  8. Question 8 · Short answer · 3 marks

    What is the difference between DOS and Linux commands?

    Answer

    DOS commands are not case-sensitive and use backslash paths (C:\). Linux commands are case-sensitive, mostly lower case, and use forward slashes (/). The words differ, e.g. DIR vs ls.

  9. Question 9 · Long answer · 5 marks

    Write the commands: (a) all .DOC files in the current directory (DOS); (b) make TEST.TXT read-only (DOS); (c) display TEST.TXT (DOS); (d) move test.txt to MyText (Linux); (e) see all hidden files (Linux).

    Answer

    (a) DIR *.DOC
    (b) ATTRIB +R TEST.TXT
    (c) TYPE TEST.TXT
    (d) mv test.txt MyText
    (e) ls -a
    
  10. Question 10 · Long answer · 5 marks

    Write the commands: (i) files in MYDIR and all subdirectories (DOS); (ii) create computer.txt with the text editor (DOS); (iii) delete the empty directory FOLDER (Linux); (iv) list all hidden files (Linux).

    Answer

    (i)   DIR MYDIR /S
    (ii)  EDIT computer.txt
    (iii) rmdir FOLDER
    (iv)  ls -a
    

Study the whole chapter

16 step-by-step lessons, all 107 practice questions with hints, flashcards and mock tests for MBOSE Class X Computer Science.

Start freeLog inSign up free: the first chapter of every subject is open.