CIS 90 - Lesson 15 Lesson Module Status Slides – draft Properties - done Flash cards – 1 st Minute quiz – NA Web calendar summary – done Web book pages – done Commands – NA Lab – NA Supplies () - Class PC's – Scripts () – 1
CIS 90 - Lesson 15 Quiz 2
CIS 90 - Lesson 15 ObjectivesAgenda Transfer project files to Windows and Linux systems Prepare for final exam No Quiz Questions from last week File transfer continued Practice Test #3 Project Workshop (optional) File Transfer and Review 3
CIS 90 - Lesson 15 Previous material and assignment 1.Questions? 4
CIS 90 - Lesson 15 Housekeeping 5
CIS 90 - Lesson 15 6 Register now to get in the next Linux courses for the Fall 2009 term
CIS 90 - Lesson 15 7
Due midnight tonight: Final Project submittal Due midnight June 3: Five forum posts Extra credit Lab X1 8
CIS 90 - Lesson 15 Remaining points to earn Forum-4 20 Test-3 30 Final project60 Extra credit Progress Check Let me know if your Grade or P/NP option is correct
CIS 90 - Lesson 15 File Transfer 10
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 / 11 Opus (a RHEL server) We will copy our work on Opus to a Windows PC Then copy from there to a Linux virtual machine
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 / /home/cis90 $ find bin/ answers/ roddyduk/ bin/ bin/submit bin/submit.bak bin/exam bin/allscripts roddyduk/review/news roddyduk/review/mail90 roddyduk/review/banner roddyduk/review/finger roddyduk/program roddyduk/exitscript roddyduk/red roddyduk/red roddyduk/blue /home/cis90 $ Use find to list the files in bin/, answers/, and your /home directory used in this class. These are the files we will archive and copy to another computer. 12 Starting in the CIS 90 class directory on Opus
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 / /home/cis90 $ find bin/ answers/ roddyduk/ | wc -l 263 /home/cis90 $ Use wc to count the number of files in the three directories 13 The bin directory has allscripts, riddles and other files used in class. The answers directory has answers for each lab. Your home directory has all the files you made during the course.
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 / /home/cis90 $ tar cvf /home/cis90/roddyduk/roddyduk.tar bin/ answers/ roddyduk/ bin/ bin/submit bin/submit.bak bin/exam bin/allscripts tar: roddyduk/roddyduk.tar: file is the archive; not dumped roddyduk/program roddyduk/exitscript roddyduk/red roddyduk/red roddyduk/blue /home/cis90 $ Backup all these files into a single tarball directories to backup Name of tarball to create create verbose 14
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 / /home/cis90 $ tar tvf /home/cis90/roddyduk/roddyduk.tar | wc -l 263 /home/cis90 $ Use the t option (table of contents) to list the contents of the tarball which are then piped to wc to count Name of tarball table of contents verbose 15
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 /home/cis90/roddyduk $ ls -l roddyduk.tar -rw-rw roddyduk cis Dec 10 13:50 roddyduk.tar /home/cis90/roddyduk $ /home/cis90/roddyduk $ gzip roddyduk.tar /home/cis90/roddyduk $ ls -l roddyduk.tar* -rw-rw roddyduk cis Dec 10 13:50 roddyduk.tar.gz /home/cis90/roddyduk $ Next, compress the archive with gzip 16 Note: gzip renames the tarball by adding the.gz suffix
CIS 90 - Lesson 15 Class Exercise Archive your work on Opus cd /home/cis90/ find bin/ answers/ $LOGNAME/ | wc -l tar cvf /home/cis90/$LOGNAME/$LOGNAME.tar bin/ answers/ $LOGNAME/ tar tvf /home/cis90/$LOGNAME/$LOGNAME.tar | wc –l cd gzip $LOGNAME.tar 17 Archive everything in your home directory (including all sub directories) plus the class bin and answer directories into one tarball. Now compress that tarball Count the files to be archived This counts the files in the archive
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 / 18 Filezilla is a free, open- source FTP solution. We will be using the Filezilla client to transfer files from one computer to another
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 / Navigate to the folder on the Windows PC to where you will download the tarball from Opus 19 The Filezilla client is installed on each classroom Windows PC
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 / Bring up the Site Manager dialog and select your account on Opus Click on Site Manager icon Click Connect button to connect to host 20
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 When connected to Opus and you will be in your home directory 21
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 / Scroll down and find the tarball 22
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 / Right click and select download 23
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 / download in progress 24
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 / Download complete Click on red X to disconnect when download is finished 25
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 / Disconnected 26
CIS 90 - Lesson 15 Class Exercise Filezilla On class PC Run Filezilla Download your tarball on Opus to the Windows desktop of your classroom PC 27
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 / Next we start up one of the Ubuntu VMs named Frodo. The ipconfig command shows the IP address to use to connect to this VM. Its blurred here because your IP address will be different 28
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 / Use the IP address you got from ifconfig to use for the Host field Use the cis90 account on Frodo 29
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 / Connected to another Linux system now 30
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 / Navigate to directory on Linux system to upload the tarball 31
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 / Right click on tarball and select Upload 32
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 / Tarball uploaded to second Linux system 33
CIS 90 - Lesson 15 Class Exercise Filezilla On class PC Fire up Frodo VM On Frodo, get the IP address for Frodo On Frodo, if it doesn't already exist, create a depot directory and in the depot directory create a opus-files directory On Filezilla, break the connection with Opus and connect now to Frodo using the IP address and cis90 credentials Transfer your tarball from the Windows desktop to the the cis90 home directory on Frodo 34
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 / Putty (SSH) in to the the Linux VM named Frodo using the same IP address Login as cis90 35
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 / login as: cis90 password: Last login: Mon Dec 8 18:22: ~]# cd depot depot]# ls misc opus-files tarballs depot]# cd opus-files/ opus-files]# ls roddyduk.tar.gz opus-files]# Login as cis90 and navigate to directory where tarball was uploaded 36
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 / opus-files]# gunzip roddyduk.tar.gz opus-files]# ls roddyduk.tar opus-files]# Unzip the tarball 37
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 / opus-files]# tar xvf roddyduk.tar bin/ bin/submit bin/submit.bak roddyduk/program roddyduk/exitscript roddyduk/red roddyduk/red roddyduk/blue opus-files]# Extract the tarball extract 38
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 / opus-files]# ls -l total 1044 drwxr-xr-x Nov 28 17:41 answers drwxr-x Nov 30 23:25 bin drwxr-xr-x Dec 10 13:50 roddyduk -rw-r--r-- 1 root root Dec 8 23:43 roddyduk.tar opus-files]# The bin, answer and home directories have been recreated 39
File Transfer Opus -> Windows PC -> Linux System CIS 90 - Lesson 15 / Note we have a different path on this system so may have to specify a relative path to script file to run opus-files]# cd roddyduk/bin bin]# ls app banner datecal hi I myscript.bak treat5 tryme backups benscript enlightenment home myscript myscript.v1 treed zoom bin]# myscript -bash: myscript: command not found bin]#./myscript Duke's CIS 90 Final Project 1) Color 2) My Find Command 3) More practice 4) Duke's friend made this one - Thank You 5) Task 5 6) Exit Enter Your Choice: 40
CIS 90 - Lesson 15 Class Exercise Filezilla On class PC Putty into your Frodo VM Login as cis90 Navigate to your tarball in depot/opus-files Unzip the tarball using: gunzip logname.tar.gz Extract the tarball using: tar xvf logname.tar Navigate into your bin directory and run./myscript 41
CIS 90 - Lesson 15 Final Exam 42
Final Exam The CIS 90 Final Exam is Test #3 CIS 90 - Lesson 15 / 43 The Final Exam is June 3 Same time and location as our usual class The final exam will be Test #3 (worth 30 points) Open book, open notes, open computer. During the test you must work alone and not ask or give assistance to others. A Practice Test 3 is available on the web site to prepare for the actual test. You may work with others and use the forum to discuss questions and answers on the practice test prior to the final exam.
CIS 90 - Lesson 15 Project Presentations 44
CIS 90 - Lesson 15 Wrap up 45
CIS Lesson 15 New commands: tarBackup and restore files gzipCompress file gunzipUncompress file New Files and Directories: 46
CIS 90 - Lesson 15 Next Class is the Final Exam 47
CIS 90 - Lesson 15 Project Workshop (optional) 48
CIS 90 - Lesson 15 Backup 49