0 index
1 Why UNIX?
2 Why FTP and Telnet?
3 Operating Systems in General
4 Hierarchies
5 Hierarchy Searching Algorithm
6 Recursive Algorithm
7 Other Trees
8 Text Based Operating Systems
9 Exploring ds9 with FTP
10 Exploring ds9 with Telnet
11 The Critical UNIX Commands
12 cd - Change Directory
13 ls - List
14 mkdir - Make Directory
15 cp - Copy
16 mv - Move
17 man - Manual
18 chmod - Change mode
19 Permission Settings
20 Interpreting Permissions
21 Common Permission Settings

outline
created using slideshow.cgi by Andy Harris















CSCI N241 Web Design: UNIX and Internet Protocols
1. Why UNIX?
  • Defacto web server standard
  • Reliable
  • Inexpensive



































CSCI N241 Web Design: UNIX and Internet Protocols
2. Why FTP and Telnet?
  • Most of us not directly on server
  • Allows us to connect to server from client
  • We can work on client -> send to server
  • Can work directly on server



































CSCI N241 Web Design: UNIX and Internet Protocols
3. Operating Systems in General
  • "Traffic Cop"
  • Control interactions between files, hardware, software, memory
  • Provides user interface
  • All have similar capabilities but very different implementations



































CSCI N241 Web Design: UNIX and Internet Protocols
4. Hierarchies



































CSCI N241 Web Design: UNIX and Internet Protocols
5. Hierarchy Searching Algorithm
  • Find the root
  • Look at the branches
    Three outcomes:
    -target is there - activate it
    -not there, but promising subcategory - go there
    and repeat steps
    -not there, nothing close - back up
    a level and repeat steps



































CSCI N241 Web Design: UNIX and Internet Protocols
6. Recursive Algorithm
  • Begins with a large set
  • Algorithm repeats on increasingly smaller subsets
  • Eventually a trivial set remains



































CSCI N241 Web Design: UNIX and Internet Protocols
7. Other Trees
  • Menus inside applications
  • Start menu (Apple menu)
  • Directory structures



































CSCI N241 Web Design: UNIX and Internet Protocols
8. Text Based Operating Systems
  • DOS and UNIX
  • Basically, the same things are available
  • Instead of graphics (icons), commands are used
  • Some memorization (or cheat card) is necessary



































CSCI N241 Web Design: UNIX and Internet Protocols
9. Exploring ds9 with FTP
  • Graphic FTP programs
  • Two file management programs



































CSCI N241 Web Design: UNIX and Internet Protocols
10. Exploring ds9 with Telnet



































CSCI N241 Web Design: UNIX and Internet Protocols
11. The Critical UNIX Commands
  • ls
  • ls -l
  • cd
  • pwd
  • cp
  • mv
  • chmod



































CSCI N241 Web Design: UNIX and Internet Protocols
12. cd - Change Directory
  • UNIX stores files in a directory tree
  • The cd command changes to the directory specified
  • If you have a directory called mystuff off of the current directory, you could type cd mystuff to change to that directory
  • To change back to a parent directory, type cd ..
  • To change to your home directory, simply type cd
  • Notes:
    directories are separated by forward slashes (/), NOT backslashes like DOS
    UNIX is case sensitive
    to locate which directory you are in, use the pwd command
    pwd stands for present working directory



































CSCI N241 Web Design: UNIX and Internet Protocols
13. ls - List
  • List current directory
  • Lists the files and subdirectories of the current directory
  • ls -l = long listing, shows details of files (including permissions)
  • There are many more - available by looking in man
  • Notes:
    - ls by itself works like a DOS dir/w; it shows the files in columns
    -use ls -l to see the permissions of files and other details
    -if your list of files is too long for the screen, you can use ls | more



































CSCI N241 Web Design: UNIX and Internet Protocols
14. mkdir - Make Directory
  • Creates a new subdirectory that is a child of the one you are on
  • DOS equivalent = md
  • Notes:
    -you must give the command a name for the directory
    -the name must be one word, and is case sensitive
    - mkdir mystuff will make a new directory called mystuff from my root directory



































CSCI N241 Web Design: UNIX and Internet Protocols
15. cp - Copy
  • Copies a file to another file or another directory
  • Notes:
    -works just like DOS copy command
    -cp myfile newfile will make a copy of myfile and call it newfile
    -if I have a directory called mystuff, cp myfile mystuff will make a copy of myfile and put it in mystuff
    -the ORIGINAL file stays there. cp just made a new version of it.



































CSCI N241 Web Design: UNIX and Internet Protocols
16. mv - Move
  • Moves a file to a new place or renames it
  • DOS equivalent:
    -RN works like the renaming behavior
    -there is no equivalent to the moving behavior
  • Notes:
    -This command works two ways:
    -mv filename filename works like a rename in DOS, the file's name is changed
    -the original file will be gone
    -mv filename directory actually moves the file into the directory and kills it from the original directory



































CSCI N241 Web Design: UNIX and Internet Protocols
17. man - Manual
  • The on-line help
  • DOS equivalent:
    -help in ver. 5.0 and later of DOS
  • Notes:
    -man topic opens up the manual page for the topic
    -the man pages can be obscure, but they contain a wealth of information
    -if man topic didn't work, try man -k topic
    this tells the man engine to search for a keyword



































CSCI N241 Web Design: UNIX and Internet Protocols
18. chmod - Change mode
  • Changes the ownership settings of your file or directory
  • Notes:
    -These settings let you do whatever you want to your files
    -When you want to make certain things accessible to others, you must change the permissions
    -You will want to do this for your web documents



































CSCI N241 Web Design: UNIX and Internet Protocols
19. Permission Settings
  • The three types of people:
    - me
    - group
    - others
  • The three settings:
    - read
    - write
    - execute (run if it's a program, go through if it's a directory)



































CSCI N241 Web Design: UNIX and Internet Protocols
20. Interpreting Permissions
  • I can do anything
  • My group can read and write, but not execute
  • Everyone else can only read it
  • r w x
    r w -
    r - -
    1 1 1
    1 1 0
    1 0 0
    7
    6
    4



































CSCI N241 Web Design: UNIX and Internet Protocols
21. Common Permission Settings
  • 711 - used for main directory
  • 755 - used for public_html directory
  • 644 - used for almost all html files and graphics
  • If in doubt, a directory can be set at 755, file to 644



































outline

Why UNIX?

Why FTP and Telnet?

Operating Systems in General

Hierarchies

Hierarchy Searching Algorithm

Recursive Algorithm

Other Trees

Text Based Operating Systems

Exploring ds9 with FTP

Exploring ds9 with Telnet

The Critical UNIX Commands

cd - Change Directory

ls - List

mkdir - Make Directory

cp - Copy

mv - Move

man - Manual

chmod - Change mode

Permission Settings

Interpreting Permissions

r w x
r w -
r - -
1 1 1
1 1 0
1 0 0
7
6
4

Common Permission Settings