ICSA 202: Computing Tools - PowerPoint PPT Presentation

1 / 32
About This Presentation
Title:

ICSA 202: Computing Tools

Description:

ICSA 202: Computing Tools & Environments. Week 5: Introduction to UNIX ... a screen-oriented message handling tool for novices ... – PowerPoint PPT presentation

Number of Views:62
Avg rating:3.0/5.0
Slides: 33
Provided by: informat949
Category:
Tags: icsa | computing | tools

less

Transcript and Presenter's Notes

Title: ICSA 202: Computing Tools


1
ICSA 202 Computing Tools Environments
  • Week 5 Introduction to UNIX

2
The Unix Platform
  • Multi-user computing system
  • Runs on many different hardware platforms
  • Originally developed by ATTs Bell Labs
  • usually a CLI, though GUIs (Xwindows) are
    available

3
UNIX Flavors
  • UNIX as a trademark registered by ATT
  • Other versions of UNIX include
  • ULTRIX Digital Equipment Corporation
  • AIX IBM
  • XENIX, LINUX developed for PCs
  • AUX Apple Computer
  • SunOS Sun Microsystems
  • Mach NeXT computer

4
The Unix Platform
  • UNIX divides work between a kernel and numerous
    shells
  • kernel - the part of UNIX that does the real
    operating system work
  • shells - the part of the UNIX that interprets the
    command that you type at the prompt
  • Bourne shell prompt
  • C-shell prompt

5
The Unix Model
your command
6
Interacting with Unix
  • Unix is case sensitive
  • Commands are very short, often not intuitive
  • System does not provide feedback for successful
    commands
  • The shell interprets the command so that the
    kernel can process it.

7
Simple Unix Commands
  • whoami
  • shows login name, your terminal connection, and
    your last login
  • date
  • displays the current time and date
  • pwd
  • (print working directory) shows what directory
    you are in
  • man command
  • provides help on the command specified

8
Unix Pathnames
  • Filename can be up to 256 characters long (in
    most versions)
  • Pathnames have only 2 parts
  • directory path
  • file name
  • all components separated by forward slash (/)
  • last component is always the filename

9
Unix Wildcards
  • asterisk
  • can represent zero or more characters
  • can be placed anywhere in the filename
  • alone is equivalent to DOS .
  • question mark ?
  • represents a single character

10
Listing Directory Contents
  • ls
  • ls -l
  • long (detailed) listing
  • ls -a
  • all files listed, including hidden files, which
    begin with a dot (.)
  • ls -F
  • shows directories with a trailing /

11
Hidden Unix Files
  • Files that begin with a . are hidden
  • .login - environmental setting file
  • .cshrc - initialization file
  • .history - your transaction history log
  • .mailrc - your mail program setting

12
Changing Directories
  • cd directory_name
  • change to a child directory
  • cd /
  • change to the root directory
  • cd ..
  • change to the parent directory
  • cd
  • return to your home (login) directory

13
Creating Deleting Directories
  • mkdir directory_name
  • directory_name can be a full pathname, beginning
    with /
  • directory_name can be a partial pathname
  • rmdir directory_name
  • remove a directory from the system
  • the directory has to be empty to be removed

14
Copying, Moving, and Renaming Files
  • Copying files
  • cp file1 file2
  • if file2 already exists it is overwritten
  • if file2 does not exist, it is created
  • Moving files
  • mv file1 file2
  • renames file1 to file2
  • file2 may include a pathname
  • mv file1 ../directory/file2
  • the .. moves up one level

15
Displaying Text Files
  • cat
  • displays the entire contents of the file
  • more
  • display the content of a file one screenful at a
    time
  • hit spacebar to go to the next page, return to go
    to next line
  • type q to exit and return to the prompt

16
Deleting Files
  • rm filename
  • may use wildcards ( or ?)
  • rm .com
  • rm proj?.doc
  • -e option displays a message after deleting each
    file
  • be careful in doing rm

17
Unix File Protection
  • Three categories of ownership
  • user, group, others
  • Three options for protection
  • read, write, execute

18
File Permissions
  • Read permission
  • allows viewing or copying of the file
  • Write permission
  • allows modifications to and deletion of the file
    and deletion
  • Execute permission
  • allows execution of the file
  • if a file is not executable, this permission is
    irrelevant

19
Directory Permissions
  • Read permission
  • allows listing of files in the directory
  • Write permission
  • allows renaming files and deleting files in the
    directory
  • Execute permission
  • allows use of the directory in a pathname and
    changing to the directory

20
Setting Protections Syntax
  • chmod who(or -, )what
  • who specifies category (u, g, and/or o)
  • use to add permissions, - to remove
    permissions, to set all possible permissions
  • what specifies permissions (r, w, and/or x)

21
Setting Protections Examples
  • chmod ux INDEX
  • adds execute permission for the owner, all others
    left unchanged
  • chmod go-w file1
  • removes write permission for the group and others
  • chmod ugorw testfile
  • sets the permissions for everyone to read and
    write, but not execute

22
Unix Text Editors
  • vi (VIsual editor)
  • the first full-screen text editor on UNIX
  • emacs
  • customizable, extensible display editor
  • pico
  • simple, display-oriented text editor

23
Pico Editor
  • designed for people to use when composing
    messages within pine
  • pine composer
  • can be used by itself

24
Starting Pico
  • pico filename
  • if file exists
  • pico
  • if file is being created
  • name the file when you exit from pico editor

25
Pico Navigation
  • use arrow keys to move the cursor
  • use Backspace key to delete a character at the
    left side of the cursor
  • use Enter key to go to the next line
  • other functions are available with the
    combinations of Ctrl key () and a letter key

26
Pico File Recovery
  • When a running pico process is disconnected, pico
    will save the current work if needed before
    exiting.
  • Work is saved under the current filename with
    ".save" appended.
  • If the current work is unnamed, it is saved under
    the filename "pico.save".

27
E-Mail Programs (UNIX)
  • mailx
  • generic mail system
  • elm
  • an interactive screen-oriented mail system for
    advanced users
  • pine
  • a screen-oriented message handling tool for
    novices

28
About Pine
  • developed at the University of Washington in 1989
  • menu-driven
  • contains only a minimum of basic features
  • can also be used for reading newsgroups (covered
    next week)

29
E-Mailing with Pine (UNIX)
  • type pine to start in menu mode
  • type pine address to start in new message mode
  • e.g., pine ell_at_it.rit.edu
  • type pine -i to start in inbox
  • shows the list of messages in the mailbox

30
Pine Mail Codes
  • N new message
  • D deleted message
  • A replied message
  • message sent directly to you
  • X selected message

31
Signature Files
  • Appended to the end of every message
  • Comes from a .signature file in your home
    directory, which you can create with a text
    editor (e.g. PICO)

32
Pine Address Book
  • Comparable to VAX aliases
  • Can create individual aliases or lists
Write a Comment
User Comments (0)
About PowerShow.com