Opening a Command Shell



Similar documents
Cygwin: getting the setup tool

Supplement I.C. Creating, Compiling and Running Java Programs from the Command Window

Supplement I.B: Installing and Configuring JDK 1.6

1 Basic commands. 2 Terminology. CS61B, Fall 2009 Simple UNIX Commands P. N. Hilfinger

WA1826 Designing Cloud Computing Solutions. Classroom Setup Guide. Web Age Solutions Inc. Copyright Web Age Solutions Inc. 1

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 2 Introducing Operating Systems

Practice Fusion API Client Installation Guide for Windows

Java Software Development Kit (JDK 5.0 Update 14) Installation Step by Step Instructions

Getting Started with Command Prompts

Supplement I.B: Installing and Configuring JDK 1.6

WA Continuous Integration with Jenkins- CI, Maven and Nexus. Classroom Setup Guide. Web Age Solutions Inc. Web Age Solutions Inc.

Windows XP File Management

Cleaning your Windows 7, Windows XP and Macintosh OSX Computers

For Introduction to Java Programming, 5E By Y. Daniel Liang

After going through this lesson you would be able to:

Developing In Eclipse, with ADT

SIMIAN systems. Setting up a Sitellite development environment on Windows. Sitellite Content Management System

STATISTICA VERSION 10 STATISTICA ENTERPRISE SERVER INSTALLATION INSTRUCTIONS

warpct.com Basic Computer Skills MS Windows XP Workbook courseware by WARP! Computer Training

6 USING WINDOWS XP 6.1 INTRODUCTION

SECURE MOBILE ACCESS MODULE USER GUIDE EFT 2013

Installing Java. Table of contents

Most of your tasks in Windows XP will involve working with information

Installing Java 5.0 and Eclipse on Mac OS X

Windows XP Pro: Basics 1

Working With Your FTP Site

Java Language Tools COPYRIGHTED MATERIAL. Part 1. In this part...

Microsoft PowerPoint 2010 Handout

Appendix A Using the Java Compiler

Right now, the latest and greatest version of Java available for download is Start with this link to find out more about it

Installing C++ compiler for CSc212 Data Structures

Command-Line Operations : The Shell. Don't fear the command line...

Importing Contacts to Outlook

Using SSH Secure FTP Client INFORMATION TECHNOLOGY SERVICES California State University, Los Angeles Version 2.0 Fall 2008.

Creating a Java application using Perfect Developer and the Java Develo...

Installing (1.8.7) 9/2/ Installing jgrasp

IT Quick Reference Guides Using Windows 7

Chapter 1: Getting Started

Internet Explorer 7. Getting Started The Internet Explorer Window. Tabs NEW! Working with the Tab Row. Microsoft QUICK Source

Understanding Files and Folders

Microsoft Windows Overview Desktop Parts

Outlook 2007: Managing your mailbox

Step One. Step Two. Step Three USING EXPORTED DATA IN MICROSOFT ACCESS (LAST REVISED: 12/10/2013)

Business Process Management IBM Business Process Manager V7.5

Click Start > Control Panel > System icon to open System Properties dialog box. Click Advanced > Environment Variables.

BIGPOND ONLINE STORAGE USER GUIDE Issue August 2005

Introduction. POP and IMAP Servers. MAC1028 June 2007

Introduction to the UNIX Operating System and Open Windows Desktop Environment

new Business Online Technical Troubleshooting Guide

Windows Offline Files

Windows 8 UEFI BIOS Update (Step-by-Step Guide)

Windows XP Managing Your Files

In-Class Lab Assignment

LAB 1. Familiarization of Rational Rose Environment And UML for small Java Application Development

Android Environment SDK

Colligo Manager 6.2. Offline Mode - User Guide

Test Note Phone Manager Deployment Windows Group Policy Sever 2003 and XP SPII Clients

Windows PowerShell Essentials

BSDI Advanced Fitness & Wellness Software

How schedule AccuTRConsole to run every hour

Linux Overview. Local facilities. Linux commands. The vi (gvim) editor

EVALUATION ONLY. WA2088 WebSphere Application Server 8.5 Administration on Windows. Student Labs. Web Age Solutions Inc.

How To Unlink Your Computer From Dropbox From Your Computer To Your Computer (For A Free Download) From Your Dropbox Account (For Free) (For An Ubuntu Install) (Free Download) (Unlock) (Reboot)

Configuring ICVMLT32.EXE as a Windows Service

Wavecrest Certificate

How to Install and use Windows XP Mode and Windows Virtual PC in Windows 7 for older 32 bit only Applications

Windows 8.1 Update 1 Supplement

An Introduction to Using the Command Line Interface (CLI) to Work with Files and Directories

Lesson 1 - Creating a C18 Project with MPLAB

How to Install Eclipse. Windows

File Manager Pro User Guide. Version 3.0

Changing Your Cameleon Server IP

Lesson 1 - Creating a Project

ProjectWise Explorer V8i User Manual for Subconsultants & Team Members

How to Configure Windows 8.1 to run ereports on IE11

Appendix K Introduction to Microsoft Visual C++ 6.0

UP L18 Enhanced MDM and Updated Protection Hands-On Lab

Microsoft. File Management. Windows Desktop. Microsoft File Management NCSEA

Lab Activity File Management with Windows Explorer Windows XP, Vista, Windows 7 and Windows 8 Brought to you by RMRoberts.com

Outlook Web App. in Office 365. The Outlook Window. Signing In. (Outlook Exchange Faculty & Staff) Getting Started

Using an Edline Gradebook. EGP Teacher Guide

Building an Embedded Processor System on a Xilinx Zync FPGA (Profiling): A Tutorial

Introduction to MS WINDOWS XP

JORAM 3.7 Administration & Monitoring Tool

Virtual Office Remote Installation Guide

File Management With Windows Explorer

CGS 1550 File Transfer Project Revised 3/10/2005

4cast Client Specification and Installation

PC Agent Quick Start. Open the Agent. Autonomy Connected Backup. Version 8.8. Revision 0

File Manager User Guide

Version Control with Subversion and Xcode

User Manual - Help Utility Download MMPCT. (Mission Mode Project Commercial Taxes) User Manual Help-Utility

Connecting to the Hospira FTP Server

BSDI Advanced Fitness & Wellness Software

STATISTICA VERSION 9 STATISTICA ENTERPRISE INSTALLATION INSTRUCTIONS FOR USE WITH TERMINAL SERVER

VERITAS NetBackup 6.0

VP-ASP Shopping Cart Quick Start (Free Version) Guide Version 6.50 March

Transcription:

Opening a Command Shell Win Cmd Line 1 In WinXP, go to the Programs Menu, select Accessories and then Command Prompt. In Win7, go to the All Programs, select Accessories and then Command Prompt. Note you can drag a shortcut off the Programs Menu to your Desktop (copy, not move) that makes it faster to just open a command shell. BTW, a command shell window is often referred to as a console.

Customizing the Command Shell Win Cmd Line 2 Right-click the title bar and select Properties; you can customize many appearance and some operational properties from here It's particularly useful to change the settings for the Window Size and the Screen Buffer Size.

Common Shell Commands Win Cmd Line 3 Typing "help" at the command prompt displays a list of shell commands with brief descriptions:

Common Shell Commands Win Cmd Line 4 Typing a command followed by "/?" displays a fuller explanation of the command:

Common Shell Commands The most common shell commands are probably: Win Cmd Line 5 CD CLS COPY DEL DIR MKDIR MOVE PATH REN RMDIR Displays the name of or changes the current directory. Clears the screen. Copies one or more files to another location. Deletes one or more files. Displays a list of files and subdirectories in a directory. Creates a directory. Moves one or more files from one directory to another directory. Displays or sets a search path for executable files. Renames a file or files. Removes a directory. Use the command-line switch \? or help <command> to get more information about a command.

Command Window Here for Vista/Win7 Win Cmd Line 6 By default, a command shell opens in your home directory. Navigating from that to another directory is an exercise in forming full and regular paths and using the cd command. It's tedious. Fortunately, Vista and Win7 make it easy to open a command shell in any directory. Hold down the Shift key and right-click on the desired folder. The context menu will the include the choice "Open command window here".

Command Window Here for XP For WinXP: - Google XP PowerToys Win Cmd Line 7 - download and install the Open Command Window Here power toy Now, if you right-click a folder in Windows Explorer, you'll have a new option:

Hierarchical File System Win Cmd Line 8 You should already be familiar with the basic notion of a hierarchical file system. We may have a number of logical drives, and separate physical devices:

File System and Paths Win Cmd Line 9 Each drive, like E shown on the previous slide is organized logically as a tree of nested directories (or folders). The top-level directory is called the root directory and is denoted by the drive letter, a colon and a back-slash; for example E:\ There is a unique full path from the root directory to every other directory on the drive. The full path is formed by concatenating directory names, separated by a back-slash: E:\CppDevelopment\EcoSys\ We can also form a relative path from one directory to another. The parent of the current directory is denoted by "..". For example:..\redticket\

Command History Win Cmd Line 10 The shell stores the most-recently executed commands in a history list. Use the F7 function key to display a scrollable list of those commands. You can use the up/down arrow keys to navigate the list, and press Enter to repeat the selected command. You can also use the up/down arrow keys directly at the command prompt to scroll through the previous commands. Note that you can use this feature to re-display a previous command and then edit that command to change file names or command-line switches. The length of the history list can be set through the shell window Properties dialog.

Directory Listing Win Cmd Line 11 The DIR command produces a listing of the files and directories in the current directory: Entries for this directory and its parent Entries that are directories themselves are flagged

Tab-completion Win Cmd Line 12 If you partially type a file name and then hit the TAB key, the shell (may) complete the name for you:

Running gcc Win Cmd Line 13 For the following examples, we assume that your Windows path is set to contain the directory containing the gcc executable. If you are running the Cygwin emulator package, see the following slide for relevant instructions. As an alternative, you could prefix the invocation of the gcc executable with the full path to it; for example: C:\Cygwin\bin\gcc-4

Setting the Windows Path Win Cmd Line 14 Cygwin doesn't add itself to the Windows path automatically. Go to Control Panel and run the System applet. Select the Advanced tab, and click on Environment Variables. Select Path under System variables and add the path to the bin subdirectory of your Cygwin installation. You can see mine listed as the second entry in the Path at right. Path entries are separated by semicolons and are not case-sensitive. To check your installation (in a very minimal way), open a Windows command shell and see if gcc is recognized:

Running gcc Win Cmd Line 15 To compile a C program from the directory containing the source file: Any error messages will be displayed in the shell window; otherwise an executable appears:

Compile w/o Linking Win Cmd Line 16

Compile to (Intel) Assembly Language Win Cmd Line 17

Other gcc Options Win Cmd Line 18 Some of the most common gcc options: -c compile and assemble but do not link -S compile but do not assemble or link; yields an assembly language listing -o <name> specify name for executable file -std=<standard> compile to specified standard (c89, c99 most commonly) -W inhibit all warning messages -Werror make all warnings be errors -Wall show more warning messages -pedantic require strict compliance with the specified standard

Executing a C Program Win Cmd Line 19 To execute a program (Windows executable file) from the command-line, just type the name of the file: Of course, in some cases the program may require you also supply parameters from the command-line, as shown above

Compiling Java Programs Win Cmd Line 20 To compile a Java program, you must use a Java compiler; Sun provides one as part of the Java Development Kit (JDK), named javac. You can test whether the compiler is in the Windows path by attempting to execute it: If everything is set up correctly, you should see a display similar to the one shown above. If not, you must add the appropriate directory to your Windows path.

Compiling Java Win Cmd Line 21 To compile a single-file Java program from the directory containing the source file: Any error messages will be displayed in the shell window; otherwise a Java class file appears:

Executing a Java Program Win Cmd Line 22 To execute a Java program from the command-line: Note that the Java interpreter is named java. Any error messages or output will appear in the command shell window. The general rule is that you invoke the Java interpreter (java) on the class file that contains the implementation of static void main().

Compiling a Multi-file Java Program Win Cmd Line 23 To compile a single-file Java program from the directory containing the source file: Any error messages will be displayed in the shell window; otherwise a Java class file appears:

Compiling a Java Program with Packages Win Cmd Line 24 To compile a single-file Java program from the directory containing the source file: Any error messages will be displayed in the shell window; otherwise a Java class file appears: