26
1 Computer Files • Stored on disks, CDs, tapes, in memory. • Types of files: plain text, formatted (.doc .xls etc…), binary (executable). • A disk has a directory structure. • Top level (root) directory, with – Files in it – Subdirectories in it.

1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

  • View
    217

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

1

Computer Files

• Stored on disks, CDs, tapes, in memory.

• Types of files: plain text, formatted (.doc .xls etc…), binary (executable).

• A disk has a directory structure.

• Top level (root) directory, with– Files in it– Subdirectories in it.

Page 2: 1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

2

UNIX File Commands

• ls -- list files.

• cd -- change directory.

• mkdir -- make new directory.

• rmdir -- delete directory.

• mv -- move a file.

• cp -- copy a file.

• rm -- remove (delete) a file.

Page 3: 1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

3

Using Telnet

• A protocol (set of rules)

• Connects your machine to another.

• Can be used to log in to a machine.

• Uses TCP to correct errors

Page 4: 1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

4

Uses of Telnet

• Logging in to remote machines

• Can connect to other services, but the logins won’t always work.– Web servers -- www.umd.edu 80

• GET /index.html

– ftp servers -- ftp.sf.net 21– Echo servers -- wolfe.umd.edu 12345

Page 5: 1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

5

Intro to File Transfers

• Name – ftp (File Transfer Protocol)

• Also lets you connect to machines– Client-Server architecture

• The command is called ftp– ftp “listens” on port 21,

• Lets you transfer/download/upload files like– MP3’s, pictures, letters, programs…

Page 6: 1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

6

Transfer Modes

• There are two transfer modes – text and binary.– Text is for files like funfile.– Binary is for files like music, pictures, Word

documents, computer programs.

• Not using binary can cause subtle errors, such as 1out of 40 pictures not working.

Page 7: 1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

7

Data Transfers

• In text mode, files may be altered to work with the recipient machine.

• Binary files are not altered at all.

• Typing bin changes to binary mode.

• Typing asc changes to text mode.

Page 8: 1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

8

Using ftp 1

• The command to use ftp is -- ftp

• You can type the host (server) name in the command prompt, or at the ftp> prompt.

• Some sites are anonymous, no login required and give you limited access.

• Some sites require a login and password.

Page 9: 1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

9

Ftp Commands

• Get to move a file to your computer.• Put to move a file from your computer.• You are in a certain directory location on

both machines. You can use cd and lcd (local change dir) to move around in the directory tree. You can use ls to see the contents of the remote directory.

• !<command> does a local command.

Page 10: 1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

10

Ftp Commands 2

• ls -- list files in the remote directory.

• cd -- change remote directory.

• cdup -- remote directory up one level.

• lcd -- change local directory.

• ? Or help -- list helpful keywords.

• close or quit -- disconnect from the server.

Page 11: 1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

11

Getting files

• recv <filename>

• recv <filename> <new-filename>

• get <filename>

• get <filename> <new-filename>

• mget <list_of_remote_files>

• get and recv do the same thing.

Page 12: 1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

12

Sending Files

• send <filename>

• send <filename> <new_filename>

• put <filename>

• put <filename> <new_filename>

• mput <list_of_local_files>

• send and put do the same thing.

Page 13: 1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

13

Ftp speed

• Depends on– Your connection speed.– Server connection speed.– Your computer’s load.– The server load.– General Internet traffic.– Restraints your ISP puts on you.

Page 14: 1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

14

Other ways to transfer

• Kermit, z-modem, x-modem – these only send one way.

• Other ftp programs within your computer.

• Downloading files within a web browser.

• Using special terminal/communications programs with special file transfer code.

• Example: Wsftp on WAM NT machines.

Page 15: 1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

15

Anonymous ftp

• Some sites don’t require logins– Similar to downloading from a website without

logging in .

• Login as anonymous

• Send email address as password

• You may not get access to everything.

• Example: ftp ftp.sf.net

Page 16: 1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

16

Anonymous ftp

• Anonymous logins not available always.

• You cannot always write files to the server.

• However, there may be an “incoming” or “uploads” directory where you can post files.

Page 17: 1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

17

Victor

• Online card catalog

• Type telnet victor

• No login needed

• Type pac (public access catalog)

• Choose terminal type– vt100 usually works

• //exit hangs up

Page 18: 1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

18

Databases on Victor

• USM campus catalogs

• Other libraries in MD.

• Out-of-state libraries.

• Periodicals index

• Other kinds of databases.

• 2 = USM catalogs

• 59 = UMCP catalogs

Page 19: 1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

19

Some types of searches

• Name search -- search for an author or editor or books on an author.

• Word search -- search for strings of words such as in a title.

• Subject Word -- search for keywords only.

Page 20: 1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

20

Victor Searches

• Browse -- try to match similar keywords, numbers or series names.– Title search tries to match a title if it can.– Series search is used for journals or series of

technical books. (eg. Lecture notes in mathematics.)

– Call number search is used if you know the approximate call number. (eg. Qa403)

Page 21: 1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

21

Newsgroups

• rn – To start newsreader at % prompt– Other readers: trn tin nn readnews– Google groups for WWW access.

• May ask if you want to subscribe.– Type N generally– Type y if you want to subscribe then enter

when the [$^.Lq] option comes up.

• Two levels: group and article selection.

Page 22: 1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

22

Newsgroup Selection

• Ask if you want to read a group [ynq]– Y or space means read, n no/next, q quit rn.

• Type g groupname to start reading a group.– Eg. g alt.test

• u means unsubscribe a group.• ! – execute shell command.• /<pattern> search for group containing this

pattern.

Page 23: 1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

23

Article Selection Level 1

• space – read next article

• q – quit this group.

• ^N – scan for next article with same title.

• n – read next article.

• p – read previous article.

Page 24: 1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

24

Article Selection Level 2

• /<pattern>/h – scan for pattern in header.

• /<pattern>/a – scan for pattern in article.

• F or f – send a reply post.

• R or r – reply to poster in email.

• s file – save this article to a file.– Hit enter when asked about mailbox format.– It will be saved to your News directory.

Page 25: 1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

25

Pnews 1

• Pnews – post an article to a newsgroup.

• Asks for newsgroup(s): List them.– Eg. alt.test

• Distribution – Choose any, (UM is good for alt.test)

• Title/Subject: Enter the subject.

• Are you sure? Y

Page 26: 1 Computer Files Stored on disks, CDs, tapes, in memory. Types of files: plain text, formatted (.doc.xls etc…), binary (executable). A disk has a directory

26

Pnews 2

• Prepared file to include?– Useful if you pre-write using a good editor.

• Editor: hit enter (should start pico).

• Write the message and hit ^X when done.

• Options – Send, Abort, Edit, List– Choose s for send if you’re happy with the post.