8-2 What is a program? What is a “Window Manager” ? What is a “GUI” ? How do you navigate the Unix directory tree? What is a wildcard? Readings: See CCSO’s.

Slides:



Advertisements
Similar presentations
The Unix File System. What are the three parts of every file on a Unix filesystem? And where is each stored? Filename - stored in directories Inode -
Advertisements

Exploring the UNIX File System and File Security
CS Lecture 03 Outline Sed and awk from previous lecture Writing simple bash script Assignment 1 discussion 1CS 311 Operating SystemsLecture 03.
Linux+ Guide to Linux Certification, Second Edition
Chapter 5 Accessing Files and Directories. How Directories Get Created OS installation: usr, dev, etc, export, kernel and others places to store installation.
The UNIX File System.
Guide To UNIX Using Linux Third Edition
Introduction to Unix (CA263) Introduction to Shell Script Programming By Tariq Ibn Aziz.
UNIX Files and Security Software Tools. Slide 2 File Systems l What is a file system? A means of organizing information on the computer. A file system.
9-2 How do you copy/move/rename/remove files? How do you create a directory ? What is redirection and piping? Readings: See CCSO’s Unix pages andCCSO’s.
Command Console Tutorial BCIS 3680 Enterprise Programming.
L INUX C OMMAND L INE I NTERFACE G UNAANBAN.G
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
CMSC 104, L031 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Reading None.
Computer Systems Week 10: File Organisation Alma Whitfield.
Overview of Linux CS3530 Spring 2014 Dr. José M. Garrido Department of Computer Science.
The file structure and related utilities CS240 Computer Science II.
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”
UNIX command line. In this module you will learn: What is the computer shell What is the command line interface (or Terminal) What is the filesystem tree.
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
10-2 What is the difference between machine code and C? Why use C? How do execution of C and Matlab programs differ? What are three methods of expressing.
1 Lecture 2 Working with Files and Directories COP 3344 Introduction to UNIX.
Introduction to Shell Script Programming
Lesson 1. PC vs. Multi-user System  Personal Computer – each user gets his/her own processor (or multicore processor).  Multi-user system – The processor,
Agenda User Profile File (.profile) –Keyword Shell Variables Linux (Unix) filters –Purpose –Commands: grep, sort, awk cut, tr, wc, spell.
Unix Basics Chapter 4.
Chapter Three The UNIX Editors. 2 Lesson A The vi Editor.
Linux+ Guide to Linux Certification Chapter Four Exploring Linux Filesystems.
Linux+ Guide to Linux Certification, Third Edition
Shell Script Programming. 2 Using UNIX Shell Scripts Unlike high-level language programs, shell scripts do not have to be converted into machine language.
Chapter Two Exploring the UNIX File System and File Security.
Week 3 Exploring Linux Filesystems. Objectives  Understand and navigate the Linux directory structure using relative and absolute pathnames  Describe.
Linux Operations and Administration
Getting Started with MATLAB 1. Fundamentals of MATLAB 2. Different Windows of MATLAB 1.
1 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Some content in this lecture added.
Operating Systems and Using Linux CMSC 104, Lecture 3 John Y. Park 1.
1 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Reading None.
Second edition Your UNIX: The Ultimate Guide Das © 2006 The McGraw-Hill Companies, Inc. All rights reserved. UNIX Commands cal – will print a calendar.
Chapter Two Exploring the UNIX File System and File Security.
Introduction to Programming Using C An Introduction to Operating Systems.
Chapter Six Introduction to Shell Script Programming.
Lesson 3-Touring Utilities and System Features. Overview Employing fundamental utilities. Linux terminal sessions. Managing input and output. Using special.
Linux Commands C151 Multi-User Operating Systems.
1 Lecture 2 Working with Files and Directories COP 3353 Introduction to UNIX.
UNIX filesystem CS 2204 Class meeting 2 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
Linux+ Guide to Linux Certification, Second Edition Chapter 4 Exploring Linux Filesystems.
A Mini UNIX Tutorial. What’s UNIX?  An operating system run on many servers/workstations  Invented by AT&T Bell Labs in late 60’s  There are many different.
Linux Tutorial Lesson Two *Getting Help in Linux *Data movement and manipulation *Relative and Absolute path *Processes Note: see chapter 1,2,3 from Linux.
CMSC 104, Version 8/061L03OperatingSystems.ppt Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux.
CMSC 104, Version 9/011 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Reading None.
Overview of Linux Fall 2016 Dr. Donghyun Kim
Agenda The Linux File System (chapter 4 in text)
First Day in Lab Making a C++ program
Lecture 2 Working with Files and Directories
Shell Script Assignment 1.
Operating Systems and Using Linux
Intro to UNIX System and Homework 1
Operating Systems and Using Linux
Operating Systems and Using Linux
Operating Systems and Using Linux
Operating Systems and Using Linux
Web Programming Essentials:
Introduction Paul Flynn
Operating Systems and Using Linux
Operating Systems and Using Linux
Operating Systems and Using Linux
Operating Systems and Using Linux
January 26th, 2004 Class Meeting 2
Presentation transcript:

8-2 What is a program? What is a “Window Manager” ? What is a “GUI” ? How do you navigate the Unix directory tree? What is a wildcard? Readings: See CCSO’s Unix pages andCCSO’s Unix pages

Engineering Workstations Unix Applications UNIX- operating system / C- programming language / Matlab Facilitate machine independent program development

8-4 Computer program(software): a sequence of instructions that tells the computer what to do. A program takes raw data as input and produces information as output. System Software: Operating Systems Unix,Windows,MacOS,VM/CMS,... Editor Programs gedit, pico, vi Applications Software: Translators and Interpreters gcc--gnu c compiler matlab – interpreter User created Programs!!!

X-windows-a Window Manager and GUI(Graphical User Interface) Click Applications and follow the menus or click on an icon to run a program.

Click Terminal to produce a command line interface. When the following slides refer to Unix commands it is assumed that these are entered on the command line that begins with the symbol “ > ” (prompt symbol).

Data, information, computer instructions, etc. are saved in secondary storage (auxiliary storage) in files. Files are collected or organized in directories. Each user on a multi-user system has his/her own home directory. In Unix users and system administrators organize files and directories in a hierarchical tree. secondary storage Home Directory When a user first logs in on a computer, the user will be “in” the users home directory. To find the name of the directory type > pwd (this is an acronym for print working directory) So the user is in the directory “ gambill ”

The string “ /home/gambill ” is called a path. The path defines the location of a file or directory in the tree known by the Unix system. For this example we know that the directory tree contains the following: The directory “ / ” is called the root directory. / homegambill

8-9 We can navigate through the directories using the “ cd ” command. For example, typing in cd.. gives

8-10 We are now in the home directory. To go back to the gambill directory : > cd ~ (tilde) or > cd or > cd gambill ( relative path ) or > cd /home/gambill ( absolute path) To go to a particular directory we can always list a path starting with the root “ / ” and going down directory by directory using the “ / ” as in the last example. This is an example of an absolute path. However since “ gambill ” is the name of a subdirectory of “ home ” we can use a relative path “ gambill ”. Here, the symbol “ / ” does not appear before gambill. Absolute and Relative Paths

8-11 Use the “ ls ” ( list ) command to view the contents of a directory. Note that the contents of a directory are files and subdirectories, however using “ ls ” alone does not distinguish between the two.

8-12 ls options arguments where options are any combinations of -a List all entries, including dot entries -c List by time of last file change -l List in long format, giving links, owner, size in bytes, and time of the last file change. -F Marks directories with a / -R Also lists each subdirectory found and arguments is a list of directories and / or filenames separated by blanks.

8-13 > ls -la produces the output

8-14 The last two lines of output from the ls -la command are described below. Note: to set permissions use the chmod command.

8-15 Permissions r - read w - write x - execute Permissions are assigned to the user, a group and other users.

8-16 Given the above directory tree. Assume that your pwd is named jsmith. Use the ls command to list the contents of the mp1 directory. jsmith mp1 > ls mp1 pwd

8-17 Given the files listed in the mp1 directory. Use the ls command to list just the files with the.m suffix. jsmith mp1 > ls mp1/*.m {FILES: main.m, final_graphs.m, test.fig, input.mat} pwd

8-18 Given the files listed in the jsmith directory. Use the ls command to list just the files with the.mat suffix. Assume that mp1 is the pwd jsmith mp1 > ls../*.mat {FILES: data.mat, a.out, } pwd

8-19 List all the files in the cs101/data directory. cs101 data > ls ~cs101/data/* {FILES: mp1_data.m, mp1.m } jsmith mp1 pwd The tilde (~) character is shorthand for the absolute path to any home directory.

8-20 From slide 14, if we want others to be able to read or run files in the ‘tom’ directory we would type: > chmod o+rx tom To change back to the original status, restricting permissions to just the user we would type: > chmod o-rx tom r - read w - write x - execute Permissions are assigned to the u user, g group and o other users.

8-21 In matlab function files will have names like f.m or test.m and workspace variables and data are stored in files like my.mat. C files will have names like f.c or test.c. If you forget the exact name of a file use > ls *.m The “ * “ is a wildcard character meaning, match zero or more characters. Another wildcard is “ ? “ which means match exactly one character.

8-22 To see the contents of a file (without using the editor program gedit) on the terminal use the more command. > more time_to_impact.m

8-23 A program is a sequence of instructions that tells the computer what to do. X-Windows is an example of a “Window Manager”. “GUI” means graphical user interface. You navigate the Unix directory tree by using the cd command. A wildcard is a character such as “ * ” or “ ? ” (in UNIX) that are used to match filenames or directory names.