The Unix Platform - PowerPoint PPT Presentation

1 / 38
About This Presentation
Title:

The Unix Platform

Description:

Unix. 1. The Unix Platform. originally developed by AT&T's Bell Labs. became popular in universities and small companies. multi-user computing system ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 39
Provided by: informat1385
Category:
Tags: bel | platform | unix

less

Transcript and Presenter's Notes

Title: The Unix Platform


1
The Unix Platform
  • originally developed by ATTs Bell Labs
  • became popular in universities and small
    companies
  • multi-user computing system
  • runs on many different hardware platforms
  • usually a CLI, though GUIs (Xwindows) are
    available
  • most commands only 2 or 3 letters long

2
UNIX Flavors
  • many different versions of UNIX
  • UNIX as a trademark registered by ATT
  • ULTRIX Digital Equipment Corporation
  • AIX IBM
  • XENIX developed for PCs
  • AUX Apple Computer
  • SunOS Sun Microsystems
  • Mach NeXT computer

3
The Unix Platform
  • division of 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

4
The Unix Model
your command
5
Interacting with Unix
  • Unix is case sensitive
  • Prompt tells you when the system is ready for
    input
  • A shell interprets the command so that the kernel
    can process it.

6
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

7
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

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

9
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 /

10
Hidden Unix Files
  • .login - environmental setting file
  • .cshrc - initialization file
  • .history - your transaction history log
  • .mailrc - your mail program setting
  • .newsrc - list of subscribed newsgroups

11
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

12
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

13
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

14
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

15
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

16
Unix File Protection
  • Three categories
  • user, group, others
  • Three options
  • read, write, execute

17
File Permissions
  • Read permission
  • allows looking at or making copies of the file
  • Write permission
  • allows making changes to the file
  • Execute permission
  • allows executing the file
  • if a file is not executable, this permission is
    irrelevant

18
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 using the directory in a pathname and
    changing to the directory

19
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)

20
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

21
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

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

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

24
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

25
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".

26
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

27
About Pine
  • developed at the University of Washington in 1989
  • written as an alternative to elm
  • simple and clear
  • contain only a minimum of basic features
  • can also be used for reading newsgroups

28
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

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

30
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)

31
Pine Address Book
  • Comparable to VAX aliases
  • Can creat individuals or lists

32
USENET Newsgroups
  • a worldwide distributed discussion system
  • organized hierarchically with the broadest
    grouping first in the name
  • some groups are moderated
  • The name of each group is separated from its
    parent and its subgroups by a period.
  • e.g., alt.collecting.pen-pencils

33
Newsgroup Hierarchies
  • comp computer-related subjects
  • news information about newsgroups
  • rec recreational topics
  • sci the various disciplines of science
  • soc a wide range of social issues
  • talk debate politics, religion, etc.
  • alt alternative subjects
  • misc subjects that dont fit elsewhere

34
Using Pine to Access Usenet
  • At the Pine Main Menu, press L
  • Select the second option, Select Here to See
    Expanded List, and then press Enter
  • Press A for subscribing newsgroups
  • Type a keyword and press X for finding
    newsgroups which contain the keyword
  • Highlight the newsgroup you want to subscribe and
    press Enter twice

35
Using Pine to Read a Newsgroup
  • After selecting a newsgroup to read, press Enter
    to open the newsgroup
  • Select a message you want to read using the arrow
    keys
  • To save a message in a folder in the pine
    program, press S for save
  • To save a message as a file in your home
    directory, press E for export

36
Posting an Original Message
  • After selecting a newsgroup to post a message,
    press C for composing
  • Enter the subject heading and compose a message
  • Press X then press Y for sending the
    message.
  • It usually takes a couple of hours for a posting
    to reach the newsgroup.

37
Posting a Follow-up Message
  • A follow-up message is a reply made to the group
    to comment on a posting.
  • Those messages with Re preceding the subject
    heading are the follow-up messages
  • After opening the message you want to reply to,
    press R for reply.
  • When the prompt asks Post follow-up message to
    newsgroup?, type Y

38
Netiquette
  • Keep in mind that you are communicating with
    people who may not share the common background
  • Dont use all upper case letters. It usually
    means screaming.
  • Use a smiley to inform the reader that you mean
    something in a humorous way.
Write a Comment
User Comments (0)
About PowerShow.com