1 / 19

Command LINE BASICS

Command LINE BASICS. EXAM 902 1.3 Given a scenario, apply appropriate Microsoft command line tools 4.1 Given a scenario, troubleshoot PC operating system problems with appropriate tools. Command Prompt.

ikeda
Download Presentation

Command LINE BASICS

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Command LINE BASICS EXAM 902 1.3 Given a scenario, apply appropriate Microsoft command line tools 4.1 Given a scenario, troubleshoot PC operating system problems with appropriate tools

  2. Command Prompt • In many cases its more efficient to manipulate files and folders using commands in a command prompt window than using Windows Explorer • In some troubleshooting situations, you have no other option but to use the command prompt window • The next section covers using basic commands at the command prompt

  3. Command Prompt prompt • Open a command prompt window by clicking the start button, then enter cmd in the search box, and press enter • At the command prompt, you enter commands to perform a variety of tasks • Windows has 2 levels of command prompt windows, a standard window and an elevated window

  4. Standard vs Elevated Windows • The Standard window opens by default and will show the directory of the currently logged on user’s folder • Commands requiring administrative privileges will not work in a standard window • The Elevated window requires the user to logon as an administrator or enter an admin password • The word “administrator” will appear in the title bar • The default directory will be: C:\Windows\system32

  5. Windows Vista or 7 An elevated command prompt window (indicated by “administrator” in the title bar) has administrative privileges In Windows 8 or 10

  6. 5 Command Prompt Tips • The following 5 Tips will help you with working in a command prompt window: • Tip 5: Type exit and press Enter to close the window • Tip 1: Type cls and press Enter to clear the window • Tip 2: Press the up arrow to retrieve the last command that you entered • Tip 4: Press Ctrl+Break or Ctrl+Pause to terminate or pause a command before it is finished • Tip 3: Press the right arrow to retrieve the last command one character at a time

  7. use thehelp command to get help with any other command and to list all available commands HELP command and results

  8. xcopy /s ping -t Switches chkdsk /f /r • Many commands can use parameters (more commonly called switches) • Switches effect how the command will work • Switches often begin with a slash followed by a single character • For example the “dir” command can be used with the “/p” switch to list files and directories one screen at a time • So you would enter “dir /p” (without quotations) at the command prompt

  9. DIR A*.??? Wildcards • When working at the command prompt you can use wildcard characters to apply a command to a group of files • You can also use them to abbreviate a filename if you don’t know the entire name • The question mark (?) is a wildcard for one character • The asterisk (*) is a wildcard for one or more characters • For example to find all files in a folder that start with “A” and have a 3 letter file extension, use the following command: ? *

  10. use the dir command to display a list of files and folders • The Dir command is used to list files and directories DIR command and results

  11. Use the Cd command to: change the current default directory Use the Rd command to: remove a directory (empty) Use the Mdcommand to: create a directory Folder Commands

  12. File Commands Use the DEL command (or Erase command) to: delete one or more files Use the REN command to: rename a file or group of files

  13. Copy, Xcopy, &Robocopy CommandsComparison • COPY • The copy commandcopies a single file or group of files • Example: To copy myfile.txt from drive C: to drive E:, use the following command: C:\>copy myfile.txt E: • XCOPY • The xcopy commanduses the same format as the copy command but it is more powerful • ROBOCOPY (robust file copy) • The robocopy command is more powerful than xcopy • Ability to tolerate network interruptions and resume copying

  14. XCOPY command and results

  15. ROBOCOPY command and results

  16. Disk Commands Chkdsk Command • fixes file system errors and recovers data from bad sectors on the drive • The chkdsk command • Used with the /F switch, chkdsk searches for and fixes two types of file system errors • Lost Clusters are clusters marked as used but does not belong to any file; the data in these clusters is lost • Cross Linked Clusters are clusters that are marked as belonging to more than one file • chkdsk looks for lost clusters and cross linked clusters and bad sectors • Used with the /R switch

  17. use thedefrag command to examine a drive for fragmented files and rewrite them in contiguous clusters DEFRAG command and results

  18. use theformat command to perform a high level format on a hard drive or other storage device Format Command FORMAT command and results

  19. use theshutdown command to shutdown the local computer or a remote computer SHUTDOWN command and results

More Related