lab1_msdos

Upload: hala-alesaili

Post on 04-Jun-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 Lab1_MSDOS

    1/12

  • 8/13/2019 Lab1_MSDOS

    2/12

  • 8/13/2019 Lab1_MSDOS

    3/12

    3-COPY

    Allows the user to copy one or more files to an alternate location.

    Examples

    copy *.* a:

    Copy all files in the current directory to the floppy disk drive.

    copy autoexec.bat c:\windows

    Copy the autoexec.bat, usually found atroot,and copy it into thewindows directory; the autoexec.bat can be substituted for anyfile(s).

    copy "computer hope.txt" hope

    Copy the file "computer hope.txt" into the hope directory. Wheneverdealing with a file or directory with a space, it must be surroundedwithquotes.Otherwise you'll get the "The syntax of the command isincorrect." error.

    http://www.computerhope.com/jargon/r/root.htmhttp://www.computerhope.com/jargon/r/root.htmhttp://www.computerhope.com/jargon/r/root.htmhttp://www.computerhope.com/jargon/q/quote.htmhttp://www.computerhope.com/jargon/q/quote.htmhttp://www.computerhope.com/jargon/q/quote.htmhttp://www.computerhope.com/issues/ch001336.htmhttp://www.computerhope.com/issues/ch001336.htmhttp://www.computerhope.com/issues/ch001336.htmhttp://www.computerhope.com/issues/ch001336.htmhttp://www.computerhope.com/jargon/q/quote.htmhttp://www.computerhope.com/jargon/r/root.htm
  • 8/13/2019 Lab1_MSDOS

    4/12

    4-Move

    Allows you to move files or directories from one folder to another,or from one drive to another.

    Examples

    move c:\windows\temp\*.* c:\temp

    Move the files of c:\windows\temp to the temp directory in root, thisis of course assuming you have the windows\temp directory.

    move "computer hope" example

    If your directory name has a space, it must be surroundedwithquotes,otherwise you will get a "The syntax of the command isincorrect." error message.

    5-DelDel is a command used todeletefiles from the computer.

    Examples

    del test.tmp

    Deletes the test.tmp in the current directory, if the file exists.

    del c:\windows\test.tmp

    Delete the c:\windows\test.tmp in the windows directory if it exists.

    http://www.computerhope.com/jargon/q/quote.htmhttp://www.computerhope.com/jargon/q/quote.htmhttp://www.computerhope.com/jargon/q/quote.htmhttp://www.computerhope.com/issues/ch001336.htmhttp://www.computerhope.com/issues/ch001336.htmhttp://www.computerhope.com/jargon/d/delete.htmhttp://www.computerhope.com/jargon/d/delete.htmhttp://www.computerhope.com/jargon/d/delete.htmhttp://www.computerhope.com/issues/ch001336.htmhttp://www.computerhope.com/issues/ch001336.htmhttp://www.computerhope.com/jargon/q/quote.htm
  • 8/13/2019 Lab1_MSDOS

    5/12

    del c:\windows\temp\*.*

    The * (asterisks) is awild character, *.* indicates that you would

    like to delete all files in the c:\windows\temp directory.

    del c:\windows\temp\?est.tmp

    The ? (question mark) is a single wild character for one letter, whichmeans this command would delete any file ending with est.tmp suchas pest.tmp or zest.tmp.

    6-mkdir

    Allows you to create your owndirectoriesin MS-DOS

    Examples

    mkdir test

    The above example creates the "test" directory in the currentdirectory.

    mkdir "computer hope"

    The above command would create a directory called "computerhope", if you want a space in your directory name it must besurrounded in quotes.

    http://www.computerhope.com/jargon/a/asterisk.htmhttp://www.computerhope.com/jargon/a/asterisk.htmhttp://www.computerhope.com/jargon/w/wildcard.htmhttp://www.computerhope.com/jargon/w/wildcard.htmhttp://www.computerhope.com/jargon/q/question.htmhttp://www.computerhope.com/jargon/d/director.htmhttp://www.computerhope.com/jargon/d/director.htmhttp://www.computerhope.com/jargon/d/director.htmhttp://www.computerhope.com/jargon/q/question.htmhttp://www.computerhope.com/jargon/w/wildcard.htmhttp://www.computerhope.com/jargon/a/asterisk.htm
  • 8/13/2019 Lab1_MSDOS

    6/12

    7-rmdir

    Removes an empty directory in MS-DOS. To delete directories

    with files or directories within them the user the /S option.

    Examples

    rmdir c:\full

    If a directory contains files or folders when attempting to deletethe directory you will receive "The directory is not empty." errormessage.

    rmdir c:\test

    Remove the test directory, if empty.

    rmdir c:\test /s

    Remove the test directory, if contain files.

    8-rename

    Used to rename files and directories from the original name to a

    new name.

    Examples

    rename c:\chope hope

    Rename the directory chope to hope.

  • 8/13/2019 Lab1_MSDOS

    7/12

    rename *.txt *.bak

    Rename all text files to files with .bak extension.

    9-Cls

    Cls is a command that allows a user to clear the complete

    contents of the screen and leave only a prompt.

    Examples

    cls

    Running the cls command at the command prompt would clear yourscreen of all previous text and only return theprompt.

    10-DateThe date command can be used to look at the current date of the

    computer as well as change the date to an alternate date.

    Examples

    date

    Display the current date and prompt for a new one. If no date isentered, the current date will be kept.

    http://www.computerhope.com/jargon/p/prompt.htmhttp://www.computerhope.com/jargon/p/prompt.htmhttp://www.computerhope.com/jargon/p/prompt.htm
  • 8/13/2019 Lab1_MSDOS

    8/12

  • 8/13/2019 Lab1_MSDOS

    9/12

    1.2 Recovery console Commands

    The Microsoft Windows recovery console was first introduced in

    Microsoft Windows 2000 and is available in all later versions of

    Windows including Windows XP. This feature enables users to get to

    a mode that allows them to recover, change, or fix files or settings

    that may be causing their computer not to boot properly.

    Below is a listing of some of the available recovery

    consolecommands .These commands can only be accessed

    through the recovery console and are not available through the

    standard MS-DOS prompt.

    1-Chkdsk

    Chkdsk is a utility that checks the computer's hard drive status for

    any cross-linked or any additional errors with thehard drive.

    Examples

    chkdsk

    Will display all information described above and also report anycrossed linked files.

    chkdsk /f

    Will fix any crossed linked files;

    http://www.computerhope.com/jargon/h/harddriv.htmhttp://www.computerhope.com/jargon/h/harddriv.htmhttp://www.computerhope.com/jargon/h/harddriv.htmhttp://www.computerhope.com/jargon/h/harddriv.htm
  • 8/13/2019 Lab1_MSDOS

    10/12

    2-Fixmbr

    The fixmbr command is a recovery console command that

    creates a new boot record.

    Examples

    fixmbr

    In the above example the boot record would be re-written for thedisk drive.

    3-Fixboot

    The fixboot command is a recovery console command that

    creates a new partition boot sector.

    Examples

    fixboot C:

    In the above example the boot sector would be written to the C:drive.

    http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/bootcons_fixboot.mspxhttp://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/bootcons_fixboot.mspx
  • 8/13/2019 Lab1_MSDOS

    11/12

    1.3 Network CommandsBelow is a listing of the various network related commands

    used in MS-DOS.

    1-Ping

    Helps in determiningTCP/IPNetworksIPaddress as well as

    determine issues with the network and assists in resolving them.

    Examples

    ping localhost

    Pings the local host, this will allow you to see if the computer is ableto send information out and receive the information back. Note thatthis does not send information over a network but may allow you tosee if the card is being seen.

    ping xxx.xxx.xxx.xxx

    Allows you to ping another computer where the x's are located arewhere you would place the IP address of the computer you areattempting to ping. If this is not able to complete, this should relayback an unsuccessful message, which could be an indication of cableissues, network card issues, hub issue, etc.

    http://www.computerhope.com/jargon/jt.htmhttp://www.computerhope.com/jargon/jt.htmhttp://www.computerhope.com/n.htmhttp://www.computerhope.com/n.htmhttp://www.computerhope.com/jargon/i/ip.htmhttp://www.computerhope.com/jargon/i/ip.htmhttp://www.computerhope.com/jargon/i/ip.htmhttp://www.computerhope.com/n.htmhttp://www.computerhope.com/jargon/jt.htm
  • 8/13/2019 Lab1_MSDOS

    12/12

    2-Ipconfig

    Ipconfig is a DOS utility that can be used from MS-DOS and a MS-

    DOS shell to display the network settings currently assigned and

    given by a network. This command can be utilized to verify anetwork connection as well as to verify your network settings.

    Examples

    To get your computers local network IP address, subnet mask, anddefault gateway typing ipconfig alone will display this information asshown below.

    ipconfig

    To get all local network information for your computer use the /allswitch as shown below

    ipconfig /all

    ipconfig /release

    It will release the current IP address.

    ipconfig /renew

    It will set a new IP address.