 2009 McGraw-Hill, Inc. All rights reserved. C for Engineers and Scientists: An Interpretive Approach Discussion 1 Commonly used commands Executing program.

Slides:



Advertisements
Similar presentations
Introduction to the Omega Server CSE Overview Intro to Omega Basic Unix Command Files Directories Printing C and C++ compilers GNU Debugger.
Advertisements

CSE1222: Unix IntroThe Ohio State University1. Common Directory Commands  lsList directory contents  cd {dir}Change working directory to {dir}  pwdPrint.
When you log into unix you are in the root directory Root directory To create a new directory you must type: mkdir newdirectory This will create a new.
Exploring the UNIX File System and File Security
Web Pages Publishing your page on ASUWlink. Unix Directory Commands ls –la –will show all directories and files –will show directory and file permissions.
The UNIX File System.
Guide To UNIX Using Linux Third Edition
Discovering SQL all rights reserved (c) 2010 agilitator.com INSTALLING MySQL 5.1 Community Server.
CSCI S-1 Section 3. Deadlines for Homework 2 Problems 1-8 in Parts C and D – Friday, July 3, 17:00 EST Parts E and F – Tuesday, July 7, 17:00 EST.
7/17/2009 rwjBROOKDALE COMMUNITY COLLEGE1 Unix Comp-145 C HAPTER 2.
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
Learning basic Unix command IT 325 operating system.
1 THE UNIX FILE SYSTEM By Chokechai Chuensukanant ID COSC 513 Operating System.
Unix Primer. Unix Shell The shell is a command programming language that provides an interface to the UNIX operating system. The shell is a “regular”
© Crown copyright Met Office An Introduction to Linux PRECIS Workshop, University of Reading, 23rd – 27th April 2012.
Created by Harry H. Cheng,  2009 McGraw-Hill, Inc. All rights reserved. C for Engineers and Scientists: An Interpretive Approach Chapter 1: Introduction.
Essential Unix at ACEnet Joey Bernard, Computational Research Consultant.
Unix Basics Chapter 4.
Cmsc 312 Operating Systems. UNIX? DOS – PC? VAX/VMS - mainframe Unix – PC, workstation, mainframe 1970 bell Lab For computer scientist? Why popular? Free.
Computer Programming for Biologists Oct 30 th – Dec 11 th, 2014 Karsten Hokamp  Fill out.
QT - a C++ based GUI QT’s Designer and Assistant.
© 2005 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures for Java William H. Ford William R. Topp Appendix E The EZJava.
Vim Editor and Unix Command gcc compiler Computer Networks.
LINUX Tuesday, 5 July :00 pm. Remote Login l Use Secure Shell (ssh) l Machine name/IP address E.g. ssh hydra.sma.nus.edu.sg Or ssh
Chapter Two Exploring the UNIX File System and File Security.
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
UNIX/LINUX Shells Shell is an UNIX/LINUX command interpreter. Shell command can be internal or external. The code to execute an internal command is part.
UNIX Commands. Why UNIX Commands Are Noninteractive Command may take input from the output of another command (filters). May be scheduled to run at specific.
March 2, 2005Wah-kai Ngai1 Installation of Geant4 1st HK Simulation Meeting.
Chapter 1: Getting Started with MATLAB MATLAB for Scientist and Engineers Using Symbolic Toolbox.
1 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Reading None.
© Crown copyright Met Office An Introduction to Linux, PP utilities, CDO and NCL Bangkok Workshop, 26 th February– 1 st March 2013.
Second edition Your UNIX: The Ultimate Guide Das © 2006 The McGraw-Hill Companies, Inc. All rights reserved. UNIX Commands cal – will print a calendar.
Introduction to UNIX Road Map: 1. UNIX Structure 2. Components of UNIX 3. Process Structure 4. Shell & Utility Programs 5. Using Files & Directories 6.
Welcome to CS323 Operating System lab 1 TA: Nouf Al-Harbi NoufNaief.net.
Basic Unix Commands CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang.
Intro to Programming Environment 1. Today You Will Learn how to connect to a machine remotely with “nomachine NX client” Learn how to create a new “source.
Created by Harry H. Cheng,  2009 McGraw-Hill, Inc. All rights reserved. C for Engineers and Scientists: An Interpretive Approach Chapter 2: Getting Started.
Lecture One. Objective: Provide description of the Command-Line Editor of Linux operating system. Enable students to understand the practical side of.
1May 16, 2005 Week 2 Lab Agenda Command Line FTP Commands Review More UNIX commands to learn File name expansion - * Introduction of vi.
E X C E E D I N G E X P E C T A T I O N S Basic LINUX Linux System Administration Dr. Hoganson Kennesaw State University Operating Systems Directory structure:
Linux Commands C151 Multi-User Operating Systems.
CS 245 – Part 1 Using Operating Systems and Networks for Programmers Jiang Guo Dept. of Computer Science California State University Los Angeles.
THE C PROGRAMMING ENVIRONMENT. Four parts of C environment  Main menu  Editor status line and edit window  Compiler message window  “Hot Keys” quick.
Basic Unix Commands & GCC Saurav Karmakar Spring 2007.
UNIX filesystem CS 2204 Class meeting 2 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
 Last lesson, the Windows Operating System was discussed along with the Windows command shell  Unix is a computer operating system, that similarly manages.
Unix Fundamentals CS 127. File navigation cd - change directory cd /var/log cd /etc/apache2 cd ~/Desktop ~ is a shortcut for the home directory.
Learning basic Unix command It 325 operating system.
General Computer Science for Engineers CISC 106 Lecture 03 James Atlas Computer and Information Sciences 6/15/2009.
CS 120 Extra: The CS1 Server Tarik Booker CS 120.
Unix Lab Fall Shell Scripting ●Through the shell (LXTerminal) you can: ●Run programs. ●Interact with the file system. ●Change settings. ●Send/receive.
General Computer Science for Engineers CISC 106 Lecture 03 James Atlas Computer and Information Sciences 9/9/2009.
 CSC 215 : Procedural Programming with C C Compilers.
VLSI Synthesis and Simulation Tools Nitin Yogi 01/09/2009
CSC 215 : Procedural Programming with C
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
How to Work on your METEO 473 codes from your PC at home
Install external command line softwares
Linux 101 Training Module Linux Basics.
Andy Wang Object Oriented Programming in C++ COP 3330
Linux/Unix - Download Ubuntu Linux :
Software Tools Recitation 1
Command Line Interface for Beginners
LING 408/508: Computational Techniques for Linguists
Exploring the UNIX File System and File Security
The Unix File System.
Lab 00 Discussion Linux Basics
Andy Wang Object Oriented Programming in C++ COP 3330
January 26th, 2004 Class Meeting 2
Presentation transcript:

 2009 McGraw-Hill, Inc. All rights reserved. C for Engineers and Scientists: An Interpretive Approach Discussion 1 Commonly used commands Executing program hello.c using Ch in ChIDE A sample problem: find the volume of a cylinder The _chrc and.chrc start-up file The _path system variable

 2009 McGraw-Hill, Inc. All rights reserved. C for Engineers and Scientists: An Interpretive Approach Commonly Used Commands Ch supports all Windows commands and most Unix commands CommandUsageDescription cd Change to the home directory cd dirChange to the directory dir cpcp file1 file2Copy file1 to file2 ls List contents in the working directory mkdirmkdir dirCreate a new directory dir pwd Print (display) the name of the working directory rmrm fileremove file chmodchmod +x fileChange the mode of file to make it executable chidechide file.cEdit and execute program file.c vivi fileEdit file

 2009 McGraw-Hill, Inc. All rights reserved. C for Engineers and Scientists: An Interpretive Approach Examples of Commands C:/Documents and Settings/Administrator> cd / C:/> mkdir tmp C:/> cd tmp C:/tmp> mkdir eme5 C:/tmp> cd eme5 C:/tmp/eme5> pwd C:/tmp/eme5 C:/tmp/eme5> cp C:/Ch/demos/bin/hello.c hello.c C:/tmp/eme5> ls hello.c C:/tmp/eme5> chide hello.c

 2009 McGraw-Hill, Inc. All rights reserved. C for Engineers and Scientists: An Interpretive Approach Executing Program hello.c Using Ch in ChIDE Click “Run” or “Start” to execute the program

 2009 McGraw-Hill, Inc. All rights reserved. C for Engineers and Scientists: An Interpretive Approach Files in Ch C:/Ch> pwd C:/Ch C:/Ch> ls bin/ demos/ docs/ include/ license/ README.TXT sbin/ config/ dl/ extern/ lib/ package/ release/ toolkit/ C:/Ch> cd docs C:/Ch/docs> C:/Ch/docs> ls README.TXT chguide.pdf chinstall.pdf chref.pdf man/

 2009 McGraw-Hill, Inc. All rights reserved. C for Engineers and Scientists: An Interpretive Approach Using GIMP to grab an image Download GIMP from Install GIMP Click menu File Click menu Create Click menu Screen Shot Click Grab. Then move the cursor to a window to be acquired. Save or print out the acquired window.

 2009 McGraw-Hill, Inc. All rights reserved. C for Engineers and Scientists: An Interpretive Approach Example 1 Find the volume of a cylinder –Radius: 3.5m –Height: 4.6m

 2009 McGraw-Hill, Inc. All rights reserved. C for Engineers and Scientists: An Interpretive Approach Example 1 (cont.)‏ Find the volume of a cylinder /* File: cylinder.c Calculate and display the volume of the cylinder with the radius of 3.5 meters and height of 4.6 meters */ #include int main() { printf("volume = %f m^3\n", *3.5*3.5*4.6); return 0; }

 2009 McGraw-Hill, Inc. All rights reserved. C for Engineers and Scientists: An Interpretive Approach Example 2 Write a program that calculates the area of a rectangle. The length and width of the rectangle are specified in the program.

 2009 McGraw-Hill, Inc. All rights reserved. C for Engineers and Scientists: An Interpretive Approach Example 2 (cont.)‏ /* File: area.c */ #include int main() { double l, w, a; l = 2.5; /* length 2.5 meters */ w = 3.6; /* width 3.6 meters */ a = l*w; printf(“The area is %f m^2\n”, a); return 0; }

 2009 McGraw-Hill, Inc. All rights reserved. C for Engineers and Scientists: An Interpretive Approach The _chrc and.chrc start-up file The file _chrc in Windows and.chrc in Unix and Mac is the individual start-up file in your home directory, and will be invoked each time when Ch is launched.

 2009 McGraw-Hill, Inc. All rights reserved. C for Engineers and Scientists: An Interpretive Approach Open the startup file _chrc in Windows or.chrc for Unix for editing through ChIDE

 2009 McGraw-Hill, Inc. All rights reserved. C for Engineers and Scientists: An Interpretive Approach The _path system variable The variable _path in the _chrc or.chrc file is used to set up paths for executable files.