Presentation is loading. Please wait.

Presentation is loading. Please wait.

Common DOS Commands Additional information. Important DOS Concepts Common DOS Commands  Why format a disk?  Partitioning and Formatting disks  Structure.

Similar presentations


Presentation on theme: "Common DOS Commands Additional information. Important DOS Concepts Common DOS Commands  Why format a disk?  Partitioning and Formatting disks  Structure."— Presentation transcript:

1 Common DOS Commands Additional information

2 Important DOS Concepts Common DOS Commands  Why format a disk?  Partitioning and Formatting disks  Structure of a disk Physical structure of a disk Logical structure of a disk File System Formats  Backing up Files  Overwriting Files  Making Exact Copies of Files Chapter 2 adds (42 slides)CTEC 1102

3 Important DOS Commands Common DOS Commands  FORMAT  LABEL  VOL  MOVE  DIR  CHKDSK  TYPE  COPY  DEL  RENAME Chapter 2 adds (42 slides)CTEC 1103

4 Why Format a Disk?  Disks used for: Permanent storage of data and programs Distributing data from one computer to another Making copies  Formatting (initializing) the disk: Process of preparing disk so that it is compatible with an operating system All disks (including hard disks) can be formatted. All information on disk will be erased CTEC 1104Chapter 2 adds (42 slides)

5 Partitioning and Formatting Disks  Hard disks must be: Partitioned Formatted with file system  Types of disk storage configuration: Basic disks Dynamic disks CTEC 1105Chapter 2 adds (42 slides)

6 Partitioning and Formatting Disks  Windows supports four file systems: NTFS Plus three FAT file systems –FAT12 –FAT16 –FAT32 CTEC 1106Chapter 2 adds (42 slides)

7 Structure of a Disk  Two parts to formatting a disk: Low-level (physical) formatting High level (logical) formatting  Low-level (physical) formatting: Sequentially numbers tracks and sectors Identifies each track and sector Disk is physically prepared to hold data  High-level (logical) formatting: Determines how OS uses a disk Builds structure to keep track of location of files Done so files can be stored and retrieved. CTEC 1107Chapter 2 adds (42 slides)

8 Structure of a Disk Windows will monitor the status of all data sectors One or more sectors are combined into logical units called clusters or allocation units CTEC 1108Chapter 2 adds (42 slides)

9 Physical Structure Track, Sector, & Cluster CTEC 1109Chapter 2 adds (42 slides)

10 Logical Structure Master Boot Record & Boot Sector  Master boot record (MBR): First part of hard disk Locates bootable partition of hard disk and gives control over to it  Boot sector: First sector on logical drive Has table of drive’s characteristics Has bootstrap loader program All disks (including non-system disks) have a boot sector. CTEC 11010Chapter 2 adds (42 slides)

11 Logical Structure CTEC 11011Chapter 2 adds (42 slides)

12 Logical Structure FAT and the Root Directory  FAT tracks “where” data is on the disk  FAT – File Allocation Table A table that tracks the physical clusters  Root directory tracks “what” is on the disk.  Root Directory: A table that tracks file information CTEC 11012Chapter 2 adds (42 slides)

13 File System Formats FAT16, VFAT & FAT32  FAT essential for: Managing data Following trail of clusters that make up a file  VFAT maintains backwards compatibility and accommodates long file names  FAT32: Enhancement of FAT file system Introduced to overcome limitations of VFAT CTEC 11013Chapter 2 adds (42 slides)

14 FAT32  FAT32: Movable Root Directory Can be located anywhere on hard disk NOTE: For disk security, performance, and efficiency use the NTFS file system CTEC 11014Chapter 2 adds (42 slides)

15 NTFS  Advantages of NTFS: Secure file system Efficient storage of data Faster file access Better data recovery Can compress files/assign disk quotas Encryption of files CTEC 11015Chapter 2 adds (42 slides)

16 NTFS  NTFS: Uses FAT cluster scheme for allocating data. Has less overhead. CTEC 11016Chapter 2 adds (42 slides)

17 Master File Table (MFT)  Master File Table (MFT): Database of all files in system Used by NTFS to track all files and directories in a volume Dynamic MFT is different from FAT. CTEC 11017Chapter 2 adds (42 slides)

18 File System Format Notes  You can convert FAT to FAT32/NTFS  You CANNOT convert FAT32/NTFS to FAT  Make use of the NTFS file system for disk security, performance, and efficiency CTEC 11018Chapter 2 adds (42 slides)

19 Backing Up Files  Application programs can usually be reinstalled from original disks.  You may want to take snapshots or backup the configuration of your programs for quicker recovery  Always keep track of any special licensing tricks you need to do 19Chapter 2 adds (42 slides)CTEC 110

20  DOS has three ways to back up data files: DISKCOPY – (floppy drives) COPY XCOPY 20Chapter 2 adds (42 slides)CTEC 110 Backing Up Files

21  Develop a regular backup routine. You can use “tape backup” You can use writable CDs You can use “external drives” 21Chapter 2 adds (42 slides)CTEC 110 Backing Up Files

22  Notes on the Backup disk Keep current Have two or more Check your backups with restore regularly  Some organizations need to recreate records Need archival backup Need transaction history 22Chapter 2 adds (42 slides)CTEC 110 Backing Up Files

23  Do regular backups: Back up files that have changed or are new  Reasons for copying files: Copy files from one disk to another Making changes on existing file Create backup copy of various data files 23Chapter 2 adds (42 slides)CTEC 110 Backing Up Files

24 Overwriting Files The file must have a unique name on same disk and subdirectory Old data replaced by new data Overwrite files on regular basis as you want to backup files Windows will inform the user that an overwrite will occur 24Chapter 2 adds (42 slides)CTEC 110

25  Concatenation is creating another file by combining the contents of two or more text (ASCII) files  Concatenation should never be done with program files, or with data files generated by programs  To avoid accidental concatenation of files, read all messages DOS displays on the screen COPY FILE1 + FILE2 NEWFILE COPY *.TXT ALLFILES 25Chapter 2 adds (42 slides)CTEC 110 Overwriting Files

26 Exact Copy of Files  You can have two files with identical contents on same disk  However there are some restrictions… For the same name Use different subdirectories For the same subdirectory Use different file names 26Chapter 2 adds (42 slides)CTEC 110

27 A Review on Some Commands CTEC 11027 FORMATformats drive LABELlabels drive VOLlist volume label on drive COPYcopies files XCOPYcopies files TYPEdisplay the contents of files DELdeletes files RENrename files MOVEmove files DATEset the date TIMEset the time UNDELETEundelete a file Chapter 2 adds (42 slides)

28 The FORMAT command  The FORMAT command syntax: FORMAT volume [/FS:file-system] [/V:label] [/Q] [/A:size] [/C] [/X] [/P:passes] [/S:state] FORMAT volume [/V:label] [/Q] [/F:size] [/P:passes] FORMAT volume [/V:label] [/Q] [/T:tracks /N:sectors] [/P:passes] FORMAT volume [/V:label] [/Q] [/P:passes] FORMAT volume [/Q] Chapter 2 adds (42 slides)CTEC 11028

29 Use /V: switch for the volume label No spaces between the colon and label Use /Q switch for a quick format Fast way to clear previously formatted disks Works like the usual FORMAT command Skips low level formatting Clears the FAT and root tables Does not check for bad sectors  Examples: FORMAT A: /V:FLOPPY1 FORMAT C: /Q FORMAT Z: /FS:FAT FORMAT U: /FS:FAT32 CTEC 11029Chapter 2 adds (42 slides) The FORMAT command

30 The LABEL Command  The LABEL command syntax: LABEL [drive:] [label] Creates, changes or deletes the volume label of a disk  Example: LABEL A: OLDNAME LABEL A: NEWNAME LABEL A: Input volume label - Up to 11 characters. Press ENTER only to delete label. CTEC 11030Chapter 2 adds (42 slides)

31 The VOL Command  The VOL command syntax: VOL [drive:] Displays the disk volume label, if any  Example: VOL Z: Volume in drive Z is USB_DISK_02 Volume Serial Number is 64B8-54F3 CTEC 11031Chapter 2 adds (42 slides)

32 The COPY Command  The COPY command syntax: COPY [/D] [/V] [/N] [/Y | /-Y] [/Z] [/L] [/A | /B ] source [/A | /B] [+ source [/A | /B] [+...]] [destination [/A | /B]] Copies one or more files to another location Can be used to combine file contents  Examples: copy c:\Windows\System32\cmd.exe c:\ 32Chapter 2 adds (42 slides)CTEC 110

33 The XCOPY Command  The XCOPY command syntax: XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W] [/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U] [/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z] [/B] [/EXCLUDE:file1[+file2][+file3]...] Has the capability of moving files, directories, and even whole drives from one location to another The /S switch copies subdirectories and files The /E switch copies empty subdirectories  Examples: XCOPY c: a: /s XCOPY n:\*.* o:\ /e Chapter 2 adds (42 slides)CTEC 11033

34 The TYPE Command  The TYPE command syntax: TYPE [drive:] [path] filename Internal command Opens/displays contents of file on screen Must be a text/ASCII file for the display to be meaningful and readable  Example: TYPE z:\ctec110\breakusb.bat TYPE o:\name.bat 34Chapter 2 adds (42 slides)CTEC 110

35 The DEL Command  The DEL command syntax: DEL [/P] [/F] [/S] [/Q] [/A [[:] attributes]] [drive:] [path] filename ERASE [/P] [/F] [/S] [/Q] [/A [[:] attributes]] [drive:] [path] filename Used to remove files from the disk Files are generally not recoverable The /P switch will ask to confirm deletion The /S switch will delete files in the subdirectories  Examples: DEL TEST.TXT DEL /p c:\Part* DEL /s p:\*.* (Directories will require confirmation) 35Chapter 2 adds (42 slides)CTEC 110

36 The RENAME command  The RENAME command syntax: RENAME [drive:][path]filename1 filename2 REN [drive:][path]filename1 filename2 Renames a file or files You cannot specify a new drive or path for your destination file  Examples: REN test testing REN testing test 36Chapter 2 adds (42 slides)CTEC 110

37 The MOVE command  The MOVE command syntax: MOVE [/Y | /-Y] [drive:][path]filename1[,...] destination MOVE [/Y | /-Y] [drive:][path]dirname1 dirname2 Can be used to rename a file or directory  Examples: move c:\windows\web c:\web2 move c:\web2 c:\web3 Chapter 2 adds (42 slides)37CTEC 110

38  There are some restrictions… When moving group of files you cannot change the names When moving an individual file/subdirectory you can change the name You can move files/directories from one directory to another and from one drive to another 38Chapter 2 adds (42 slides)CTEC 110 The MOVE command

39 The DATE command  The DATE command syntax: DATE [/T | date] Displays or sets the date Requires Administrator rights to change Type DATE without parameters to display the current date setting and to prompt for a new one Press ENTER to keep the same date Use /T switch to skip the prompting for a new date  Examples: DATE DATE /T DATE 05-22-13 (Set the date to May 22 nd, 2013) DATE 05.22.13 DATE 05/22/13 39Chapter 2 adds (42 slides)CTEC 110

40 The TIME command  The TIME command syntax: TIME [/T | time] Displays or sets the system time Requires Administrator rights to change Type TIME with no parameters to display the current time setting and a prompt for a new one Press ENTER to keep the same time Use /T switch to skip the prompting for a new time  Examples: TIME TIME /T TIME 15:22 (Set the time to 3:22 pm) 40Chapter 2 adds (42 slides)CTEC 110

41 The UNDELETE command  The UNDELETE command syntax: UNDELETE [d:][path][filename] [/DT|/DS|/DOS] UNDELETE [/list|/all|/purge[d:]|/status|/load|/U|/S[d:]|/Td:[-entries]] Has been removed from current Windows OS versions Restores files deleted with the DELETE command Removes the first character of the file Requires user to supply first character of the file upon undelete  Examples: UNDELETE \letters\*.* /all (Recover all files in the letters directory) UNDELETE /dt (Recover files in current directory using the delete-tracking file) 41Chapter 2 adds (42 slides)CTEC 110

42 END of Addition Information  HOMEWORK Lab 2 DOS Quiz 2 Chapter 2 adds (42 slides)CTEC 11042


Download ppt "Common DOS Commands Additional information. Important DOS Concepts Common DOS Commands  Why format a disk?  Partitioning and Formatting disks  Structure."

Similar presentations


Ads by Google