1 / 29

The Command Line Interface

The Command Line Interface. The OS files. IO.sys MSDOS.sys Command.com IO and MSDOS are hidden files, COMMAND.COM shows in directory listings. The Prompt. This can be (re)set using the PROMPT command Displays the current drive and current directory A:>

chika
Download Presentation

The Command Line Interface

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. The Command Line Interface

  2. The OS files • IO.sys • MSDOS.sys • Command.com • IO and MSDOS are hidden files, COMMAND.COM shows in directory listings

  3. The Prompt • This can be (re)set using the PROMPT command • Displays the current drive and current directory • A:\> • This means the computer is waiting for you to type some command and is “looking” at the A: drive, root directory

  4. Where is the Command Line? • In Windows 9x, click Start | Run and type COMMAND • In Windows 2000, XP, click Start | Run and type CMD • In Vista and 7, click Start and type CMD in the Search Box • Either way, you get to a black screen with white lettering

  5. And to get out of it • Type EXIT at the prompt – or - • Click on the close box (upper right corner)

  6. File Names • Classic is 8.3; Windows still creates them • FileNa~1 for File Named Joe • 2K and XP will do this five times, then switch to different method • File extensions link file to creating program .DOC for Word documents, .XLS for Excel spreadsheets and now .DOCX and .XLSX • Program files are .EXE or .COM • Windows file names can be 255 characters

  7. File Format • Each (version of a) program stores its file(s) in a specific format • Some programs can “read” other file formats, some won’t • Simply changing the file extension DOES NOT change the file format • You need to watch this when sending files to other people: they need the application you used, or one that can read that format

  8. File Header File Data (in some form) Clear Text File Footer ASCII file in contrast

  9. ASCII • American Standard Code for Information Interchange • 256 characters (8-bits) • Alphabets are in lower 128 codes • ASCII files (.txt) often contain “tuning” information for applications • Use NotePad to create or edit

  10. Unicode • 16-bit version of 8-bit ASCII • Lower 256 codes of Unicode line up with ASCII • Allows special characters and languages to be used with Windows

  11. File Organization • We start at the “root” of a drive • We add “folders” (or directories) at the root level • We can then add files, or more folders, under those folders

  12. Can contain files or directories C:\ Income Data Expenses Games Jan Feb Jan Feb Mar Inc.txt C:\Income\Jan\Inc.txt

  13. DIR • Gives you a directory listing of the current directory (without any additional info)

  14. CD • Change Directory • CD <name> to go down one level • CD .. To go up one level

  15. Change Drive • Type drive letter and colon, press <Enter> • A:\>C: takes you from A: to C: drive • C:\>A: takes you back to A: • Can be combined with most commands • DIR A:\ will give you the directory of A:\ (root) directory from any location on any other drive

  16. MD • Make directory immediately below current directory RD [/s] • Removes directory immediately below current directory – must be empty, unless you use the /S option • There is NO recycle bin at the command prompt

  17. Running a Program • Type the name of the program, any switches and press <Enter> • We will do this with FDISK and FORMAT • Programs have .COM or .EXE extensions

  18. Create a File • For our work at the Command Prompt, use Notepad to create .TXT file(s) with just some text in them • Any command prompt, then type notepad at that prompt to open NotePad

  19. Copy • Copy <what> <where> • Copy c:\test\file1.txt c:\real\file1.txt • C:\real>copy c:\test\file1.txt

  20. Rename a file • REN <what> <new name> • REN rico.txt arturo.txt • Obviously, rico.txt has to exist and arturo.txt does not exist

  21. File Attributes • Four basic attributes: Hidden, System, Read Only and Archive • Turn on attribute with: ATTRIB + (h,s,r,a) • Turn off an attribute with: ATTRIB – (h,s,r,a)

  22. Wildcards • The asterisk (*) will replace (up to) eight characters (or more, for long file names) • The question mark (?) will replace ONE character • *.DOC = all files that have .DOC extension • File0? = file01, file02, file03 to file09 • Jan* = all files that start with Jan • Can be used with almost all commands that take a file name

  23. Delete a File • DEL or ERASE command • There is no UNDO command; it is gone forever • Be very careful with this command

  24. Batch Files • ASCII text files (use NotePad or Edit) with .BAT extension • Can include all the commands we have looked at, plus lots more • Can save a lot of typing if you want to do the same thing over and over

  25. CHKDSK • Check Disk command. • It needs total access to hard disk drive • Will lurk in background until you restart the system; then it will run after POST and before Windows loads.

  26. SFC • System File Checker • Sfc /scannow • Tends to undo a Service Pack upgrade • Wants the Windows installation media

  27. Shutdown • That’s what it does • Can shut down a remote system

More Related