You are on page 1of 4

DOS COMMANDS Ques1 What is DOS. Explain some of its features?

Ans: An Operating System is a set of programs that help in controlling and managing the Hardware and the Software resources of a computer system. The operating System is used for operating the system or the computer. It is a set of computer programs and also known as DOS (Disk Operating System). The main functions of DOS are to manage disk files, allocate system resources according to the requirement. DOS provides features essential to control hardware devices such as Keyboard, Screen, Disk Devices, Printers, Modems and programs. Basically, DOS is the medium through which the user and external devices attached to the system communicate with the system. DOS translate the command issued by the user in the format that is understandable by the computer and instruct computer to work accordingly. It also translates the result and any error message in the format for the user to understand. Ques 2 List the name of files required to boot system from DOS? Also mention the size of files in different operating system versions such as Windows 95,98 and XP Ans: FOR MS-DOS : FILE SIZE IN WINDOW XP 95,98 not available 1. IO.SYS 232 BYTES 2. MSDOS.SYS 158 BYTES 3. COMMAND.COM 538 KB. Ques 3 Describe FAT and its structure?

Ans: FAT Folder Structure


Folders have set of 32-byte Folder Entries for each file and subfolder contained in the folder The Folder Entry includes the following information:

Name (eight-plus-three characters) Attribute byte (8 bits worth of information, described later in this section) Create time (24 bits) Create date (16 bits) Last access date (16 bits) Last modified time (16 bits) Last modified date (16 bits.) Starting cluster number in the file allocation table (16 bits) File size (32 bits)

There is no organization to the FAT folder structure, and files are given the first available location on the volume. The starting cluster number is the address of the first cluster used by the file. Each cluster contains a pointer to the next cluster in the file, or an indication (0xFFFF) that this cluster is the end of the file. The information in the folder is used by all operating systems

that support the FAT file system.A FAT file has four attributes bits that can be turned on or off by the user - archive file, system file, hidden file, and read-only file. Ques4 Differentiate between Internal and external commands. Ans: The internal commands reside in COMMAND.COM, which loads into memory when the computer system is started; these commands do not reside on disk. The external commands are files that do reside on disk and have an extension of .COM, .EXE, or .BAT. Both command types are executed from the MS-DOS prompt. Ques 5 What is the function of the following commands ? With the most used switches . 1. Dir : display directory switch : /a all 2. type :display content of file 3. ver : disk version 4. vol : volume, size of a drive. 5. prompt : used to change dos prompt. 6. echo : echos a message. 7. copy : copies a file 8. pause : Suspends processing of a batch program and displays the message Press any key to continue . . . 9. md : make directory 10. cd : change directory 11. rem : Records comments (remarks) in a batch file or CONFIG.SYS. 12. del : delete a file. 13. ren : rename a file. 14. cls : clear screen 15. date : display date and prompts to change. 16. time : display current system time prompts to change. 17. format : format a local drive. 18. label : change label of a disk volume 19. xcopy : Copies files and directory trees.Specifies the file(s) to copy. destination Specifies the location and/or name of new files. Switches : /A Copies only files with the archive attribute set, doesn't change the attribute. /M Copies only files with the archive attribute set,turns off the archive attribute. 20. doskey : Edits command lines, recalls Windows XP commands, and creates macros. 21. mem : Displays the amount of used and free memory in your system. Switches : /PROGRAM or /P Displays status of programs currently loaded in memory. /DEBUG or /D Displays status of programs, internal drivers, and other information. /CLASSIFY or /C Classifies programs by memory usage. Lists the size of programs, provides a summary of memory in use, and list largest memory block available. 22. chkdsk : Checks a disk and displays a status report.

23. attrib : Displays or changes file attributes. Switches : + Sets an attribute. - Clears an attribute. R Read-only file attribute. A Archive file attribute. S System file attribute. H Hidden file attribute. [drive:][path][filename] Specifies a file or files for attrib to process. /S Processes matching files in the current folder and all subfolders. /D Processes folders as well. 24. find : Searches for a text string in a file or files. Switches : /V /C /N /I Displays all lines NOT containing the specified string. Displays only the count of lines containing the string. Displays line numbers with the displayed lines. Ignores the case of characters when searching for the string.

25. more : Displays output one screen at a time. Switches : /E Enable extended features /C Clear screen before displaying page /P Expand FormFeed characters /S Squeeze multiple blank lines into a single line /Tn Expand tabs to n spaces (default 8)

Ques 6 Switch to DOS prompt and execute the following commands in a sequence and note the output in each case.(Do not paste the scrren shot as an output) i. ii. iii. iv. v. vi. Execute the mem command and note the output. Again execute the command with /c and /p switches Note the version of your operating system Note the volume of your drive Change the volume label to your name Again see the volume label

vii. Reset the volume label to original one viii. Note the current time and change it to evening 5 PM ix. Note the current date and try change it to 01/01/1901 x. Reset the actual time xi. Go to the root directory and see the contents of the directory xii. Again se directory to include hidden files xiii. Note the contents of AUTOEXE.BAT and CONFIG.SYS if they exist xiv. Change the system prompt to your name followed by xv. Execute commands : ver,vol,cls. xvi. Reset the original prompt xvii. Change the prompt to contain time along with path? Also execute a command. xviii. Reset the original prompt xix. Create a directory named MCA1 in the root directory xx. Switch to newly created directory xxi. With the help of copy con command create a file name letter.txt with the following contents xxii. See contents of your directory xxiii. See contents of your file xxiv. Complete the file using edit command xxv. Come back to DOS prompt and see the contents of your file xxvi. Open the file in notepad and set the date and signature column xxvii. Come back to DOS prompt and see the contents of your file xxviii. Create the following subdirectories in MCA 1 directory? Books and Data xxix. Copy the letter.txt file in Data directory xxx. Delete the file from MCA1 directory xxxi. See the directory structure using tree/f xxxii. Come back to the root directory xxxiii. Make a copy of letter.txt in Books directory also xxxiv. Try removing MCA1 directory xxxv. Switch to MCA1 directory and try removing Data sub directory xxxvi. Switch to Books directory xxxvii. Using a copy con command create a new file name friends.dat and type any ten names with some common sir-names? Save the file and come back to DOS prompt xxxviii. See contents of your file xxxix. Display the names alphabetically xl. Count the total number of persons with the same sir- name xli. Make friends.dat a read only file xlii. Try deleting the file xliii. Hide the file xliv. See contents of your directory using dir and dir/a xlv. Reset the file properties from Windows xlvi. Come back to DOS prompt and see your directory contents

You might also like