Slide 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 ___________________________________ ___________________________________ Slide 2 ___________________________________ UNIX File Commands • • • • • • • ls cd mkdir rmdir mv cp rm ___________________________________ -- list files. -- change directory. -- make new directory. -- delete directory. -- move a file. -- copy a file. -- remove (delete) a file. ___________________________________ ___________________________________ ___________________________________ 2 ___________________________________ ___________________________________ Slide 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 ___________________________________ ___________________________________ ___________________________________ 3 ___________________________________ ___________________________________ Slide 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 ___________________________________ 4 ___________________________________ ___________________________________ Slide 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… 5 ___________________________________ ___________________________________ Slide 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. ___________________________________ 6 ___________________________________ ___________________________________ Slide 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. ___________________________________ ___________________________________ ___________________________________ 7 ___________________________________ ___________________________________ Slide 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. ___________________________________ ___________________________________ ___________________________________ 8 ___________________________________ ___________________________________ Slide 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. ___________________________________ ___________________________________ ___________________________________ 9 ___________________________________ ___________________________________ Slide 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. 10 ___________________________________ ___________________________________ ___________________________________ ___________________________________ ___________________________________ Slide 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. ___________________________________ ___________________________________ ___________________________________ 11 ___________________________________ ___________________________________ Slide 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. ___________________________________ ___________________________________ ___________________________________ 12 ___________________________________ ___________________________________ Slide 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. ___________________________________ ___________________________________ 13 ___________________________________ ___________________________________ Slide 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. ___________________________________ ___________________________________ ___________________________________ 14 ___________________________________ ___________________________________ Slide 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 ___________________________________ 15 ___________________________________ ___________________________________ Slide 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. ___________________________________ ___________________________________ ___________________________________ 16 ___________________________________ ___________________________________ Slide 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 17 ___________________________________ ___________________________________ Slide 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 ___________________________________ ___________________________________ ___________________________________ 18 ___________________________________ ___________________________________ Slide 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. ___________________________________ ___________________________________ ___________________________________ 19 ___________________________________ ___________________________________ Slide 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) ___________________________________ ___________________________________ 20 ___________________________________ ___________________________________ Slide 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. 21 ___________________________________ ___________________________________ Slide 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. ___________________________________ 22 ___________________________________ ___________________________________ Slide 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. ___________________________________ ___________________________________ ___________________________________ 23 ___________________________________ ___________________________________ Slide 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. 24 ___________________________________ ___________________________________ Slide 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 25 ___________________________________ ___________________________________ Slide 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. ___________________________________ 26 ___________________________________ ___________________________________