Notes Assignment #1 is due next Friday by 11:59 pm via e-mail Test #1 will be held Thursday February...

23
Notes Assignment #1 is due next Friday by 11:59 pm via e-mail Test #1 will be held Thursday February 18 at the start of class (one period long) Format: Multiple Choice Fill in Blanks Short Answer

Transcript of Notes Assignment #1 is due next Friday by 11:59 pm via e-mail Test #1 will be held Thursday February...

Page 1: Notes Assignment #1 is due next Friday by 11:59 pm via e-mail Test #1 will be held Thursday February 18 at the start of class (one period long) Format:

Notes

• Assignment #1 is due next Friday by 11:59 pm via e-mail

• Test #1 will be held Thursday February 18 at the start of class (one period long)

• Format:– Multiple Choice– Fill in Blanks– Short Answer

Page 2: Notes Assignment #1 is due next Friday by 11:59 pm via e-mail Test #1 will be held Thursday February 18 at the start of class (one period long) Format:

Agenda

• Recap of Sending E-Mail• Receiving e-mail attachments via Pine• Working with Directories

– Directory Definition

– Creating Directories

– Copying Files among directories

– Display / Combine Files

• FTP application

Page 3: Notes Assignment #1 is due next Friday by 11:59 pm via e-mail Test #1 will be held Thursday February 18 at the start of class (one period long) Format:

Pine

How to Receive Attachments

• Read E-mail message

• Press V to view attachments

• Select attachment file

• Press S to save file

• File will be saved on your home directory

Page 4: Notes Assignment #1 is due next Friday by 11:59 pm via e-mail Test #1 will be held Thursday February 18 at the start of class (one period long) Format:

Unix Mail Command

• It is difficult to edit a composed message in Unix mail.

• Make sure to check spelling of words BEFORE pressing ENTER to go to next line

• If you want to abort message, press <CTRL><z>

Page 5: Notes Assignment #1 is due next Friday by 11:59 pm via e-mail Test #1 will be held Thursday February 18 at the start of class (one period long) Format:

Directories

• The directory of a disk is an area where the names and locations of files are stored.

• Each storage device such as a hard disk has at least one directory which is called Root.

• Directories make it more efficient to store files under logical categories or locations.

Page 6: Notes Assignment #1 is due next Friday by 11:59 pm via e-mail Test #1 will be held Thursday February 18 at the start of class (one period long) Format:

Directories

Inverted Tree Diagrams visualize directory structures

Root ( / )

students

msaul

tmp

Students is theparent directory of msaul

Page 7: Notes Assignment #1 is due next Friday by 11:59 pm via e-mail Test #1 will be held Thursday February 18 at the start of class (one period long) Format:

Making Directories

Building directories is similar in approach to building a house

• Begins from a foundation (root)

• Need to build in proper order (add on addition to house in right location)

• Need to step-back and look at construction (ls, pwd)

Page 8: Notes Assignment #1 is due next Friday by 11:59 pm via e-mail Test #1 will be held Thursday February 18 at the start of class (one period long) Format:

Create a Directory tmp From Your Default Directory

Questions:• Where are we located?

• Where do we want to build directory?

• What command to use?

• How to confirm if directory is in right location?

Page 9: Notes Assignment #1 is due next Friday by 11:59 pm via e-mail Test #1 will be held Thursday February 18 at the start of class (one period long) Format:

Where are we located?

• Logon to Phobos account

• Issue command pwd to determine location (home directory)

Page 10: Notes Assignment #1 is due next Friday by 11:59 pm via e-mail Test #1 will be held Thursday February 18 at the start of class (one period long) Format:

Where do we want to build directory?

• Want to build a directory called tmp that branches-off of your home directory (msaul)

• We need to be in home directory (msaul) before issuing command to create the directory tmp.

Page 11: Notes Assignment #1 is due next Friday by 11:59 pm via e-mail Test #1 will be held Thursday February 18 at the start of class (one period long) Format:

What command to use?

• Type mkdir tmp at the Unix prompt, followed by ENTER

Page 12: Notes Assignment #1 is due next Friday by 11:59 pm via e-mail Test #1 will be held Thursday February 18 at the start of class (one period long) Format:

How to confirm if directory is in right location?

• Type ls -l at the Unix prompt

or

• Type tree at the Unix prompt

Page 13: Notes Assignment #1 is due next Friday by 11:59 pm via e-mail Test #1 will be held Thursday February 18 at the start of class (one period long) Format:

Subdirectory

• A subdirectory is a directory that relates to its parent directory.

• Sub means “under” in latin and indicates that the directory branches off previous directory

• For example, tmp is a directory, but it is also a subdirectory of msaul

Page 14: Notes Assignment #1 is due next Friday by 11:59 pm via e-mail Test #1 will be held Thursday February 18 at the start of class (one period long) Format:

Directories

• Relative Directory Address– Directories relative to other directories– eg. cd ../lab1 would mean to move back to

parent directory and then to lab1

• Absolute Directory Address– Full directory path– eg cd /home/msaul/lab1

Page 15: Notes Assignment #1 is due next Friday by 11:59 pm via e-mail Test #1 will be held Thursday February 18 at the start of class (one period long) Format:

Create a Directory tmp From Your Default Directory

Root ( / ) (directory)

home (subdirectory)

msaul (subdirectory)

tmp (subdirectory)

tmp (subdirectory)

Page 16: Notes Assignment #1 is due next Friday by 11:59 pm via e-mail Test #1 will be held Thursday February 18 at the start of class (one period long) Format:

Copying / Moving / Renaming Files

cp source.file destination.file

mv (specify file pathnames)

mv old.filename new.filename

Page 17: Notes Assignment #1 is due next Friday by 11:59 pm via e-mail Test #1 will be held Thursday February 18 at the start of class (one period long) Format:

Changing Directories

cd directory

cd directory path

cd

cd .. (change to parent directory)

Page 18: Notes Assignment #1 is due next Friday by 11:59 pm via e-mail Test #1 will be held Thursday February 18 at the start of class (one period long) Format:

Other Unix Commands

• Find– Used to locate files within directories

• More– Used to view files (ability to see screen by

screen)

• Touch– Used to create an empty file to be later editing

using text editor such as nled

Page 19: Notes Assignment #1 is due next Friday by 11:59 pm via e-mail Test #1 will be held Thursday February 18 at the start of class (one period long) Format:

Redirection

• A method to redirect output from a printer or a screen display onto a file

• eg– find lab1 -print > lab_structure

Page 20: Notes Assignment #1 is due next Friday by 11:59 pm via e-mail Test #1 will be held Thursday February 18 at the start of class (one period long) Format:

Pipe

• A useful method to combine one or more Unix commands

• eg– ls -al | more– This displays full listing of files, but pauses

when screen becomes full

Page 21: Notes Assignment #1 is due next Friday by 11:59 pm via e-mail Test #1 will be held Thursday February 18 at the start of class (one period long) Format:

Removing Directories

Removing directories is reverse order of building directories

• Cannot remove directories containing files or other subdirectories

• Need to “step-back” to at least parent directory to remove empty directory

• Issue command rmdir

Page 22: Notes Assignment #1 is due next Friday by 11:59 pm via e-mail Test #1 will be held Thursday February 18 at the start of class (one period long) Format:

Create a Directory tmp From Your Default Directory

Root ( / ) (directory)

home (subdirectory)

msaul (subdirectory)

tmp (subdirectory)

tmp (subdirectory)

Page 23: Notes Assignment #1 is due next Friday by 11:59 pm via e-mail Test #1 will be held Thursday February 18 at the start of class (one period long) Format:

FTP Application

• This application is used for transferring files among different computer systems.

• FTP stands for File Transfer Protocol

• The FTP application used at Seneca College is WS_FTP