Download presentation
Presentation is loading. Please wait.
Published byAlexis Richards Modified over 9 years ago
1
Using Hard Drives Additional information
2
Hierarchical Filing Systems Why Organize a Hard Disk? Relative and Absolute Paths Subdirectory Markers The Current & Default Drive and Directory Understanding the PATH Command The PROMPT Command Metastrings Chapter 3 adds (50 slides)CTEC 1102 Important DOS Concepts Using Hard Drives
3
Important DOS Commands Using Hard Drives treeGraphically displays the folder structure of a drive or path dirDisplays a list of files and subdirectories in a directory mkdir or mdCreates a directory rmdir or rdRemoves (deletes) a directory chdir or cdDisplays the name of or changes the current directory moveMoves files and renames files and directories path Displays or sets a search path for executable files promptChanges the cmd.exe command prompt attribDisplays or changes file attributes (FAT) icaclsDisplays or modifies discretionary access control lists (DACLs) on specified files, and applies stored DACLs to files in specified directories. (NTFS) Chapter 3 adds (50 slides)CTEC 1103
4
Hierarchical Filing Systems Root directory: Created when disk is formatted Represented by (\) - the backslash Acts as an index to disk Chapter 3 adds (50 slides)CTEC 1104
5
FAT16 Root directory - fixed size & location on disk FAT32 Root directory free to grow as necessary NTFS No limit to # of files/directories in root directory Chapter 3 adds (50 slides)CTEC 1105 Hierarchical Filing Systems
6
Subdirectories: Important part of organizing disk Can contain subdirectories No limit in number of files Subdirectory structure: Looks like inverted family tree Root directory At top of tree Point of entry in hierarchical structure Chapter 3 adds (50 slides)CTEC 1106 Hierarchical Filing Systems
7
Chapter 3 adds (50 slides)CTEC 1107 Hierarchical Filing Systems
8
Chapter 3 adds (50 slides)CTEC 1108 Hierarchical Filing Systems
9
9Chapter 3 adds (50 slides)CTEC 110 Hierarchical Filing Systems
10
General comments: Only one root directory point of entry Directories Have only one parent directory Can have any # of child directories Chapter 3 adds (50 slides)CTEC 11010 Hierarchical Filing Systems
11
General comments: Each subdirectory Dependent upon structure above it Knows only its parents and children User can name subdirectories but not the root directory Chapter 3 adds (50 slides)CTEC 11011
12
Why Organize a Hard Disk? Windows OS is installed, certain folders are created including: Windows Program Files Documents and Settings My Documents Chapter 3 adds (50 slides)CTEC 11012
13
Why Organize a Hard Disk? Need to determine: How program is installed Where program is installed Can choose own installation location. Presents problems when asking for technical support. Chapter 3 adds (50 slides)CTEC 11013
14
Why Organize a Hard Disk? Part of good organizational scheme is to create meaningful names for data files Need naming conventions Long file names problematic Use of spaces can create problems Similar file names problematic Organize disk by way you work. Application programs are tools. Chapter 3 adds (50 slides)CTEC 11014
15
Example Programs & Data Files The WUGXP directory contains: The subdirectory “Games” which contains: The directory “BOG2” which contains: The application program called “BOG” BOG.EXE is the application program. BOG.DAT is the data file. Chapter 3 adds (50 slides)CTEC 11015
16
Relative path: Route from where you are to where you want to go Can move to directory above it and beneath it Absolute path: Direct route from root directory to the subdirectory of interest Is always absolutely correct Chapter 3 adds (50 slides)CTEC 11016 Relative and Absolute Paths
17
Directory: Knows about files/directories within itself Knows about its immediate child directory and parent directory To move to another parent directory either start from the root or give relative path The root directory is the parent or common “ancestor” of all directories. Chapter 3 adds (50 slides)CTEC 11017 Relative and Absolute Paths
18
Chapter 3 adds (50 slides)CTEC 11018
19
Relative and Absolute Paths Absolute path examples: cd p:\ctec110 cd p:\ctec110\homework\movies Relative path examples: cd.. cd ctec110 cd..\phone\personal cd..\..\.. Chapter 3 adds (50 slides)CTEC 11019
20
Subdirectory Markers Single. (one period) Specifies the current directory Double.. (two periods) Specifies the parent directory of current subdirectory Can use.. (two periods) To move up one directory position You cannot use this shortcut symbol to move down in the directory hierarchy Chapter 3 adds (50 slides)CTEC 11020
21
The Current and Default Drive and Directory Using the CD command with no parameters will display the present current and default directory Example: CD [drive:][path] The CD command does not use spaces as delimiters Chapter 3 adds (50 slides)CTEC 11021
22
When Z: \ > is displayed on screen it is the: Prompt Default drive and directory Current drive and directory The default drive can be changed The default directory can be changed DOS Command line is not case sensitive Chapter 3 adds (50 slides)CTEC 11022 The Current and Default Drive and Directory
23
The TREE Command The TREE command syntax: TREE [drive:] [path] [/F] [/A] Used to view Disk Structures Presents a graphic representation of the disk structure Examples: Shows the disk structure hierarchy TREE G: TREE N: TREE O: TREE P: TREE C: Chapter 3 adds (50 slides)CTEC 11023
24
The DIR Command The DIR command syntax: DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N] [/O[[:]sortorder]] [/P] [/Q] [/R] [/S] [/T[[:]timefield]] [/W] [/X] [/4] Displays a list of files and subdirectories in a directory Has many options and can be used to search for files Examples: DIR c:\Windows /w DIR c:\Windows /p DIR hosts /s DIR c:\Windows /a:d Chapter 3 adds (50 slides)CTEC 11024
25
The DIR Command DIR /s /s Searches subdirectories Try This… cd /d c:\Windows DIR hosts /s Now change to the directory the hosts file is in (first entry) and look inside it type hosts Chapter 3 adds (50 slides)CTEC 11025
26
The MKDIR (MD) Command The MD command syntax: MKDIR [drive:] path MD [drive:] path Formatting a disk will prepare it to hold files. Setting up subdirectories prepares the disk to hold logical groups of files Create parent and child directory with one command. If parent directory does not exist, the OS will create child directories and any necessary intermediate directories. Examples: Creates directories and subdirectories MD c:\sales MD c:\ctec110 MD p:\sales\old MD p:\sales\new Chapter 3 adds (50 slides)CTEC 11026
27
The RMDIR (RD) Command The RD command syntax: RMDIR [/S] [/Q] [drive:]path RD [/S] [/Q] [drive:]path Removes (deletes) a directory The directory must be empty unless a switch is used Examples: Deletes files, directories and subdirectories RD p:\files RD p:\history\europe RD p:\history\us Chapter 3 adds (50 slides)CTEC 11027
28
The RMDIR (RD) Command Used to remove directories Cannot remove Directories containing hidden or system files Directory you are presently in [Current Directory] Default subdirectory Root directory Cannot use with wildcards Chapter 3 adds (50 slides)CTEC 11028
29
Without parameters: Removes only empty subdirectories One file at a time from the bottom up With parameters: Can remove directory trees Can remove directories … with hidden or system files Can traverse the directory tree from the top down Chapter 3 adds (50 slides)CTEC 11029 The RMDIR (RD) Command
30
RD with /S parameter: Deletes directory and contents … (subdirectories/files) with one command Removes a complete directory tree path RD with /Q parameter: RD runs in quiet mode Useful, fast, powerful, and DANGEROUS! Chapter 3 adds (50 slides)CTEC 11030 The RMDIR (RD) Command
31
The CHDIR (CD) Command The CD command syntax: CHDIR [/D] [drive:][path] CHDIR [..] CD [/D] [drive:][path] CD [..] Displays the name of or changes the current directory CD with no parameters will display the current and default directory CD followed by path name will change the current and default directory Current is what you see Default is what the drive is on The /D parameter will change the default drive and directory Examples: cd cd z:\ctec110 cd /d c:\Windows Chapter 3 adds (50 slides)CTEC 11031
32
The MOVE Command The MOVE command syntax: MOVE [/Y | /-Y] [drive:][path]filename1[,...] destination MOVE [/Y | /-Y] [drive:][path]dirname1 dirname2 Moves files and renames files and directories Can move one or more files Can rename a directory Examples: MOVE text.txt p: (file move) MOVE p:text o:\Books (file move to directory) MOVE letter1,letter2 o:\memos (files moved to directory) MOVE o:\89memos o:\90memos (directory move) Chapter 3 adds (50 slides)CTEC 11032
33
The MOVE Command MOVE command can: Move files to new location Rename files at the same time Rename directories/subdirectories Safe to move data files and data directories. Moving program files and renaming program directories could cause programs to fail Chapter 3 adds (50 slides)CTEC 11033
34
The PATH Command The PATH command syntax: PATH [[drive:] path [;…] [%PATH%]] PATH Displays or sets a search path for executable files Type PATH ; to clear all search-path settings and direct cmd.exe to search only in the current directory Type PATH without parameters to display the current path Including %PATH% in the new path setting causes the old path to be appended to the new setting. Examples: path path o:;%path% path %path%;p: path ; Chapter 3 adds (50 slides)CTEC 11034
35
Understanding the PATH Command PATH command: Locates/executes executable program files Searches Memory Current directory Subdirectories specified with PATH command Chapter 3 adds (50 slides)CTEC 11035
36
Understanding the PATH Command Chapter 3 adds (50 slides)CTEC 11036
37
The PROMPT Command The PROMPT Command syntax: PROMPT [text] Changes the cmd.exe command prompt Has a number of Metastrings that can be used Example: Prompt $p$g (default) Prompt $d$q$g ({date}=>) Chapter 3 adds (50 slides)CTEC 11037
38
The PROMPT Command PROMPT command without parameters displays current drive and > sign Changes the way the prompt is displayed and does not change its function PROMPT command information: Is contained within CMD.EXE Syntax - PROMPT [text] Can include Metastrings Chapter 3 adds (50 slides)CTEC 11038
39
PROMPT Command Metastrings Chapter 3 adds (50 slides)CTEC 11039
40
PROMPT Command Metastrings Chapter 3 adds (50 slides)CTEC 11040
41
The ATTRIB Command The ATTRIB command syntax: ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [+I | -I] [drive:][path][filename] [/S [/D] [/L]] Displays or changes file attributes Example: ATTRIB +R text.txt ATTRIB +RSH iosys.sys ATTRIB -R text.txt ATTRIB /? Chapter 3 adds (50 slides)CTEC 11041
42
The ATTRIB Command Based on FAT file systems Used to determine the attributes of a file Used to change the attributes of a file ATTRIB +R text.txt makes the file read only ATTRIB -R text.txt Removes the read only ATTRIB /? help on options Chapter 3 adds (50 slides)CTEC 11042
43
The ATTRIB Command A for Archive H for Hidden R for Read-only S for System Chapter 3 adds (50 slides)CTEC 11043
44
The ICACLS Command The ICACLS command syntax 1.ICACLS name /save aclfile [/T] [/C] [/L] [/Q] 2.ICACLS directory [/substitute SidOld SidNew [...]] /restore aclfile [/C] [/L] [/Q] 3.ICACLS name /setowner user [/T] [/C] [/L] [/Q] 4.ICACLS name /findsid Sid [/T] [/C] [/L] [/Q] 5.ICACLS name /verify [/T] [/C] [/L] [/Q] 6.ICACLS name /reset [/T] [/C] [/L] [/Q] 7.ICACLS name [/grant[:r] Sid:perm[...]] [/deny Sid:perm [...]] [/remove[:g|:d]] Sid[...]] [/T] [/C] [/L] [/Q] [/setintegritylevel Level:policy[...]] Chapter 3 adds (50 slides)CTEC 11044
45
The ICACLS Command The ICACLS command syntax (continued) 1.Stores the DACLs for the files and folders that match the name into aclfile for later use with /restore. Note that SACLs, owner, or integrity labels are not saved. 2.Applies the stored DACLs to files in directory. 3.Changes the owner of all matching names. This option does not force a change of ownership; use the takeown.exe utility for that purpose. 4.Finds all matching names that contain an ACL explicitly mentioning Sid. 5.Finds all files whose ACL is not in canonical form or whose lengths are inconsistent with ACE counts. 6.Replaces ACLs with default inherited ACLs for all matching files 7.See the help on this command for more detailed information! Chapter 3 adds (50 slides)CTEC 11045
46
The ICACLS Command The ICACLS command syntax NOTES (continued) Sids may be in either numerical or friendly name form. If a numerical form is given, affix a * to the start of the SID. /T indicates that this operation is performed on all matching files/directories below the directories specified in the name. /C indicates that this operation will continue on all file errors. Error messages will still be displayed. /L indicates that this operation is performed on a symbolic link itself versus its target. /Q indicates that icacls should supress success messages. Chapter 3 adds (50 slides)CTEC 11046
47
The ICACLS Command Examples: icacls c:\windows\* /save AclFile /T - Will save the ACLs for all files under c:\windows and its subdirectories to AclFile. icacls c:\windows\ /restore AclFile - Will restore the Acls for every file within AclFile that exists in c:\windows and its subdirectories. icacls file /grant Administrator:(D,WDAC) - Will grant the user Administrator Delete and Write DAC permissions to file. icacls file /grant *S-1-1-0:(D,WDAC) - Will grant the user defined by sid S-1-1-0 Delete and Write DAC permissions to file. Chapter 3 adds (50 slides)CTEC 11047
48
The ICACLS Command Based on NTFS file systems Used to determine the attributes of a file Used to change the attributes of a file Has way too many different command syntaxes to list Do a “help icacls” at the command prompt to see the different ways to use it Chapter 3 adds (50 slides)CTEC 11048
49
The ICACLS Command -Nuser has no access -Fuser has full access -Muser has right to modify/delete file -RXuser has read and execute rights -Ruser has read-only access -WUser has write-only access, can’t delete -DUser can delete file /denyDenied attribute access Chapter 3 adds (50 slides)CTEC 11049
50
END of Additional Information HOMEWORK Lab 3 DOS Quiz 3 Chapter 3 adds (50 slides)CTEC 11050
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.