Home

CIS 90 - Lesson 11

image

Contents

1. INSERT CIS 90 Lesson 11 R iiis VI Moving around in a file Use in COMMAND mode h moves the cursor one character to the left Try typing a j moves the cursor down one line number in front of k moves the cursor up one line these commands and notice what moves the cursor one character to the right happens Ad scrolls down 10 lines u scrolls up 10 lines f page forward one page Ab page back one page With vim not vi you can use arrow and page keys instead of these letter commands 113 CIS 90 Lesson 11 R 11 ru VI Moving around in a file Use in COMMAND mode Try typing a number in front of these commands and notice what happens w moves the cursor one word forward b moves the cursor one word back O zero moves the cursor to the beginning of the line moves the cursor to the end of the line G moves the cursor to the last line in the file 1G moves the cursor to the first line in the file 105G moves the cursor to line 105 114 CIS 90 Lesson 11 L R H pu VI Saving and Quiting Use in command LINE mode W writes any changes to the file you are editing like Save q quits vi if you have saved your changes q quits vi even if you haven t saved changes wq writes and quits wq writes and quits vi even if you haven t saved changes 115 CIS 90 Lesson 11 VI Reading in and Writing out files Use in command LINE mode w filename saves your file
2. 19 CIS 90 Lesson 11 R p amp append to a command to run it in the background Example 1 home cis90 simben grep r potato usr opt 2 dev null Cen N G3 N6 BEompt For long running commands or scripts you must wait for the command to finish before you type more commands Example 2 home cis90 simben 9 grep r potato usr opt 2 dev null amp ters home cis90 simben date Tue Apr 15 14 43 09 PDT 2014 Hit enter to get the prompt and continue working while the find command runs in the background CIS 90 Lesson 11 FK 1 1 p Job Control A feature of the bash shell amp Append to a command to run it in the background bg Resumes a suspended job in the background fg Brings the most recent background process to the foreground jobs Lists all background jobs Use Jobs bg fg to list and resume jobs in the foreground or background 22 Xe CIS 90 Lesson 11 est 1959 Job Control A feature of the bash shell When a process is running status R the user can stop it status T and choose whether it H Running in runs in the background or foreground Running in Background Stopped PID 501 bash 83 CIS 90 Lesson 11 Job Control A feature of the bash shell Command Command amp 9 Running in Foreground N a Ctrl F CIS 90 students Ctrl Z everyone else Running in Background Stopped Use the
3. Home Catalog Where to buy bout Jobs Media Blog Cart The Mug of Vi 2 Cl Bi LET gt m y z E Tem 12 OUNC 8 sig Mug Label Mozilla was E gt a n a es heawy d Eie Edit View History Bookmarks Tools Help e c Gy http nostarch com mug bightm vy Yahoo 12 95 Disabler Cookies i CSS El Forms 8 Images Information Miscellaneous s Outline Sa Resize P Tools ke View Sourcer d Options x Cabrillo College Home Page x we 0 unread Yahoo Mail richsimms x Big Mug Label x Sams Publishing Contact Us Order n NO STARCH PRESS q the finest in geek entertainment Home Catalog Where to buy About Jobs Media Blog Cart Google Custom Search Search Hydratio Click on the image to return to Mug of Vi main page harmony See mug text md FILE COMMANDS T DELETING INSERTING TEXT go to beginning of line zero INSEQUI CDS 5 vi filename s edit a file or files idw dd x delete word line character 3 move to next previous sentence ab vi r filename retrieve saved file after crash judd nx delete lines n characters ib move to next previous paragraph m ZZ wq X save and exit PX X delete character forward backward W move forward back one word iq q quit quit without saving 1D d delete to end of line i go to end of current or next word 3 iW tw fn save file save file as fn idm
4. simben90 simben90 oslab cabrillo edu s password Access deed simben90 os N Last login d com mail Is Current directory C source destination dr 2 NN 7 Welcome to Or T SeNving Cabrillo C What command copies t Terminal type xterm Terminal type is xterm home cis90 simben S putty 4 A Tasks Alarms Q1 What command shows the other users logged in to the computer Q2 What environment variable is used by the shell to determine which directories to search when locating a command CIS 192 Fa CIS VLab e CIS 192 Getting Started ual Machines NBEH cp IST ue Id ag Client a poi eis 6 is gt Name Target or Status contains Clear X Status Details Initiated by Target El License Period 331 days remaining CISLABirsimms Z Mc cu B X a T s m i Ed se 6 52 AM 10 10 2012 CIS 90 Lesson 11 hl pu CCC Confer lin a Video webcam optional Follow moderator Double click on postages stamps 7 i CCC Confer AL SIM File Edit View Window Help Application Sharing Audio Breakout Rooms New Page Delete Page Fi Page Chat Graphing Calculator In Session Invite Interaction Moderator Polling Profile Recorder Session Plan Telephony Timer do Video Whiteboard iim mer is a Make Video Follow Moderator Focus a
5. CIS 90 Lesson 11 VI COMMAND mode INSERT mode command LINE mode 111 CN 2 CIS 90 Lesson 11 est 1959 home cis90 simben cp letter myletter home cis90 simben vi myletter COMMAND mode EP simben90 opus Jello Mother Hello Father Here I am at Camp Granada Things are very entertaining and they say we ll have some fun when it stops raining All the counselors hate the waiters and the lake has alligators You remember Leonard Skinner He got ptomaine poisoning last night after dinner Now I don t want this to scare you but my bunk mate has malaria You remember Jeffrey Hardy Their about to organize a searching party Take me home oh Mother Father take me home I hate Granada Don t leave me out in the forest where I might get eaten by a bear Take me home I promise that I won t make noise or mess the house with other boys oh please don t make me Nstay I ve been here one whole day Dearest Father darling Mother how s my precious little brother I will come home if you miss me I will even let Aunt Bertha hug and kiss me myletter 29L 1059C INSERT mode Command LINE mode EP simben90 opus BB simben90 opus e1lo Mother Hello Father Hello Mother Hello Father Here I am at Camp Granada Things are very entertaining Here I am at Camp Granada Things are very entertaining and they say we ll have some fun when it stops raining and they say we ll ha
6. From simmsben opus cabrillo edu Mon Nov 10 20 25 32 2008 Date Mon 10 Nov 2008 20 25 32 0800 From Benji Simms lt simmsben opus cabrillo edu gt To roddyduk opus cabrillo edu Subject Good bones Hey Duke I really appreciate that bone you sent me last week Let me know if you want to go mark some fence posts this weekend Later Ben The message Duke reads has all the typos fixed amp 127 2 Mn AN PT p DE j FEN ee O AN 44 DP i 1 REN LoXXese melo sson 11 N pi El l j e st 1 5 5 5 m t 4 2 Fix an email message before sending In vi e Use i to enter insert mode e make changes e save with Esc wq 128 CHR CIS 90 Lesson 11 est 1959 Eile Edit View Document Comments Forms Tools Advanced Window Help Lab 9 will help you start building your vi skills CIS 90 Linux Lab Exetcise Lab Si Editing files with vi Spring 2012 Lab 9 Editing files with vi In this lab you will use the vi editor to create new files and edit existing files Forum Browse to htzp opus cabrillo edu forum viewforum php f246 Check the forum for any late breaking news about this lab The forum is also the place to go if you get stuck have a question or want to share something you have learned about this lab Procedure Log on to Opus so that you have a command line shell at your service Change directory to edits to start this lab 1 Create a text file ca
7. started We are currently editing over 1 532 articles About this wiki Mew tips Policies and how to edit Discussions and asking questions Create a new tip Vim on Freenode IRC Featured tip for April view archive We all know what a tab page is each tab holds a different file Actually Vim tabs are not like that Instead tab pages in Vim offer much more flexibility and provide many features that are unavailable with standard editors vi refere Login NM ua PREMIERES Z TONIGHT 1019c 99 Information Vim documentation Links to guides books tutorials and information on other sites Vim scripts Recent changes and descriptions of featured scripts Vim news News from this wiki and vim org How to report spam bed bean and thai mills nr Tips and tricks for VIM users 121 CIS 90 Lesson 11 est 1959 Pre The Mug of vi THER u y ju germ amp Lupa gue Mox as fs z ee a _ EN Ab Vu 7 B File Edit View History Bookmarks Tools Help Cc 4 i http nostarch com mug htm Disabler A Cookies LI CSS El Forms amp e Information Ca Miscellaneous a Outlines Resizer Tools View Source Options x e e E P E Cabrillo College Home Page x Ww 0 unread Yahoo Mail richsimms i The Mug of Vi x a Sams Publishing Contact Us x NO STARCH PRESS the finest in geek entertainment
8. 1 Prompt 2 Parse 3 Search 4 Execute 5 Nap 6 Repeat 52 CIS 90 Lesson 11 E i pu Pa rse Ste p The shell must expand filename expansion The shell uses Qo ox UM a characters and variables during the parse step spaces to separate find La name egg 2 dev null Note there is an options arguments i invisible lt newline gt and redirection metacharacter at the end of the command Parsing RESULTS Command find This will be passed to the command Options and arguments if the command can be located on the path name 1968 egg This vvill be handled Redirection by the shell The Connect stderr to dev null the bit bucket command if loaded will not see this Note Because Benji had a 1968 egg file in his home directory 54 the shell expands egg to 1968 egg CIS 90 Lesson 11 A Mo iz ru ee F4 i Y r i 1 8 7 System Commands Applications Kernel Search Step 1 Prompt 2 Parse 3 Search 4 Execute 5 Nap 6 Repeat 55 CIS 90 Lesson 11 Search Step uses PATH variable Command find The shell now must search in order every directory on Benji s path to locate the first occurrence of the find command Benji s path is defined by the value of his PATH variable ist directory searched usr lib qt 3 3 bin 2nd directory searched usr local bin The shell locates the 3rd directory searched bin find command in the 4th dir
9. 282 of 331 points orome 82 273 of 331 points arwen 99 330 of 331 points pallando 0 0 of 331 points beregond 0 0 of 331 points pippen 67 225 of 331 points bilbo 54 181 of 331 points quickbeam 91 304 of 331 points celebrian 98 327 of 331 points rian 0 0 of 331 points dwalin 95 317 of 331 points samwise 80 266 of 331 points eomer 8900 296 of 331 points shadowfax 0 O of 331 points faramir 93 310 of 331 points strider 8900 296 of 331 points frodo 9096 300 of 331 points theoden 5600 187 of 331 points gwaihir 10600 351 of 331 points treebeard 104 347 of 331 points ioreth 9400 312 of 331 points tulkas 85 282 of 331 points ulmo 80 268 of 331 points If you are not happy with your current standing contact the instructor ASAP 24 CIS 90 Lesson 11 I 1 Zr u M Jesse s checkgrades python script http oslab cabrillo edu forum viewtopic php f 31 amp t 773 amp p 2966 home cis90 simben checkgrades smeagol Remember your points may be zero simply because the assignment has not been graded yet Use your LOR code name as Quiz YOU Carned 23 Pointo Que OF possible an argument on Quiz You earned 3 points out of possible the checkgrades Quiz You earned 3 points out of possible command Quiz You earned 3 points out of possible Forum Post 1 You earned 20 points out of a possible 20 Lab 1 You earned 30 points out of a possible 30 Lab
10. vi dogbone LI i D gt D gt LI i D gt D gt te Te Type this ete A 100 CIS 90 Lesson 11 See this EP simben90 opus Pee i ES MM dogbone New File Take your hands OFF THE MOUSE don t use it in vi 101 CIS 90 Lesson 11 dogbone New File Keep your hands OFF THE MOUSE don t use it in vi 102 CIS 90 Lesson 11 Keep your hands OFF THE MOUSE dont use it in vil 103 CIS 90 Lesson 11 est 1959 es Very carefully type these five lines EP simben90M opus echo n What is your name NAME n What is your favorite bone BONE Hi NAME your favorite bone is SBONET Ma Ma Ma Ma Ma Ma Ma Ma Ma Ma Ma Ma i F Lf a Hi Keep your hands OFF THE MOUSE dont use it in vi 104 Cal As oed CIS 90 Lesson 11 rr H 1 t Have your neighbor check that your five lines are PERFECT ES simben90 opus n What is your name NAME n What is your favorite bone BONE Hi NAME your favorite bone is S BONE MT Ma Ma Ma Ma Ma Ma Ma ama Ma Ma Ma Lf Hi Keep your hands OFF THE MOUSE don t use it in vi 105 CIS 90 Lesson 11 est 1959 Tap the esc key EP simben90 opus echo n What is your name NAME n What is your favorite bone BONE Hi NAME your favorite bone is
11. 02 16 51 04 02 Losol 04 03 10 23 01 17 This scans the latest wtmp log file and lists your most recent five logins to Opus 34 CIS 90 Lesson 11 grep practice For the time period covered by the current wtmp log file What was the date of your earliest login Type your earliest login date into the chat window CN Meg CIS 90 Lesson 11 Fa E iz t grep usage search output of a command rsimms oslab ls bin sh Joins bash bin csh bin dash bin ksh Jboln rbash bin sh 7bin tech rsimms oslab ksh dash Look familiar lab 8 Shows how to compare shells 6 sh by size and record the biggest one in a file sh 4 15 csh size rsimms oslab ps 1 B 5 UID PID PPID C PRI NI M WCHAN TTY TIME CMD 0S 201 27553 27552 0 80 0 1308 pts 0 00 00 00 bash 0S 201 27651 27553 0 80 0 1376 pts 0 00 00 00 ksh 0S 201 27652 27651 0 80 0 517 pts 0 00 00 00 dash 0S 201 27653 27652 0 80 0 1307 pts 0 00 00 00 sh 0S 201 27654 27653 0 80 0 1458 pts 0 00 00 00 esh OR 201 27663 27654 0 80 0 1214 ots 0 00 00 00 ps rsimms oslab ps 1 grep csh tus 201 27654 27653 0 380 De 1458 pPts7V 00 00 00 csh rsimms oslab ps 1 grep csh gt bigshell rsimms oslab J cat bigshell Cis 20L 2 02 21999 U GU Use aoe pts 0 00 00 00 csh 36 CIS 90 Lesson 11 R pul grep practice e For the bash dash ksh sh and csh shells which shell process uses the least memor
12. 90 Lesson 11 Job Control A feature of the bash shell bg command e Resumes a suspended job in the background est 1959 e rsimms opus sleep 5 1 Stopped bg resumes the sleep command rsimms opus bg l sleep 5 amp rsimms opus 2101 6204 6203 T5 1165 rsimms opus ps 1 u rsimms S UID PID PPID C PRI ADDR SZ PID 7728 S ZO 2268 1600 U 79 2460 S 201 5369 5368 0 76 1165 IS gone S 201 6203 6200 0 75 2491 S 0 R 0 F 5 0 5 0 O 201 rsimms opus 7742 09069 18 1061 144 CME Co CIS 90 Lesson 11 Signals Jim s app script cca po oc Mo i gt P rsimms 2 opus home cisS 0 depot bin sh app script to demostrate use of signals Usage run app with no options or parameters Send signals to it with keystrokes or kill command Notes stty echo stop the display of characters typed stty echo makes typed characters visible again stty susp 4 sets suspend keystroke to Ctlr a to stop forground processes stty susp sets suspend character to 8 to stop foreground processes de EHE de dE dE dE dE dE dE dE dE dE 2 Iqnore SIGINT echo n quit it 3 Handle SIGQUIT stty echo susp z echo ee echo cleanup exit 15 Handle SIGTERM banner testing stty echo susp ples This is why Ctrl F suspend stopped working and we had to use Ctrl Z No Neg CIS 90 Lesson 11 F Ha Tangent on Dg and SIGCON
13. I m looking at you KMail Most front end applications don t provide a way for you to add your own custom words Apparently creating your own personal dictionary is ridiculous easy with aspell I t O YO U lr d ct on a lr y If your language is English create a file in your home directory called aspell en pws personal ws 1 1 en O Samat quasirhombicosidodecahedron The first line is a required header Every subsequent line is a word you want to add to your dictionary can t believe l ve let this sit for so long Because it s a nice text file syncing this file between machines to take your di Es wei If your language is English create a file in your home directory ums called aspell en pws To stay ont updates on Lastly othe personal ws 1 1 en 0 Samat quasirhombicosidodecahedron Googling linux aspell personal dictionary vields this page Bingo Thank you Samat Jain 134 CIS 90 Lesson 11 Kk Ll pw spell command home cis90 roddyduk edits ed home cis90 roddyduk echo personal ws 1 1 en 0 gt aspell en pws home cis90 roddyduk echo CIS gt gt aspell en pws home cis90 roddyduk cd edits home cis90 roddyduk edits spell text This is how you would add your own custom dictionary to be used with spell checks 135 CIS 90 Lesson 11 RN E p est 1959 home cis90 simben cat edits spellk Spell Check Eye halve a spelling chequer It came wi
14. Jobs command to view 84 stopped and background jobs CN Mes CIS 90 Lesson 11 R p Job Control Find out with keystroke combination is configured to suspend a process home cis90ol simmsben stty a Speed 38400 baud rows 24 columns 80 line 0 intr C quit N erase kill U eof D eol undef OON cundeii evt cundeii iere Oest OD S susp F TIE E AR werase W lnext V flush O min 1 time 0 Deseo v RT Oo Trac EC EC ONE crea ea a er tiem re axe Cl EE TOAD 15D nbi onm CIN DENT TP a EE Rem TN DES fa SOL Re 4a nue rt Agnes bern Exon x em dere u XaNny aimacdoeud i1 559 Op 0840 cheue OC EN le 8 OA MO PE GNO CT sonlge GOL ell OE CEN A Or Ot a DO SD Ss Oi wet OSEO isig icanon iexten echo echoe echo echonl noflsh xcase tostop echoprt echoctl echoke home cis9001 simmsben In this case it is Ctrl F that will be used to suspend a process How is yours configured 85 CIS 90 Lesson 11 home cis90ol simmsben Ctrl Z or Ctrl F to suspend process 1 Stopped home cis90ol simmsben Ctrl Z or Ctrl F to suspend process ll stoppea home cis90ol simmsben Ctrl Z or Ctrl F to suspend process 3 Stopped home cis90ol simmsben 1 Le pe 3 Job Control Managing jobs sleep 120 sleep sleep 110 sleep sleep 100 sleep jobs sleep sleep sleep 120 110 100 E20 110 100 i j i OM D Ms
15. M Instead of using bg to resume a stopped process in the background lets try a SIGCONT signal 18 instead home cis90 roddyduk Ctrl F or Ctrl Z typed here 1 Stopped home cis90 roddyduk B uS UID PLD EE 0 5 1000 10705 10704 0 F 1000 10743 10705 O R 1000 10744 10705 home cis90 roddyduk 1 Stopped home cis90 roddyduk home cis90 roddyduk LI Running home cis90 roddyduk fo UID PLD PPID 0 S 1000 10705 10704 O S 1000 10743 10705 O R 1000 10746 10705 home cis90 roddyduk LI Running home cis90 roddyduk 1 Running home cis90 roddyduk 1 Done Note sending a 18 signal or using the bg command will sleep 60 sleep 60 ps I gt PRI NE ADDE 524 O 76 1165 0 75 0 926 0 78 G EDSI jobs sleep 60 kill 18 10743 jobs sleep 60 amp ps I C PRE NL ADDE 524 0 75 De 1163 0 85 g 926 HU y 0 1050 jobs sleep 60 amp jobs sleep 60 amp jobs sleep 60 resume a stopped process WCHAN wait finish WCHAN wait 222900 LLX pts 0 pts 0 pts 0 LATE pts 0 pts 0 pts 0 Ue JO 00 00 DOT OO TIME ers 00 00 00 00 TIME EO DU 00 00 00 00 CMD bash sleep ps CMD bash sleep ps 150
16. Moderator You Make Video Follow Speaker Send Camera Snapshot To Whiteboard Camera Settings Maximum Simultaneous Cameras CN CIS 90 Lesson 11 est 1959 Universal Fix for CCC Confer 1 Shrink 500 MB and delete Java cache 2 Uninstall and reinstall latest Java runtime Control Panel small icons General Tab gt Settings 500MB cache size Delete these n Java Control Panel r Temporary Files Settings e E gt Control Panel AB Control Panel tems En General Java Security Advanced Adjust your computer s settings wwhy Smell icons About W Action Center Administrative Toots wg AutoPtay Wb Backup ond Restore View version information about Java Control Panel Bamboo Preferences B Beats Audio Control Panel P Gometnc Dences El Cox Management Select the location where temporary files are kept Bl Credential Manager Date and Time Q Detautt Prog ans Wi Desktop Gadgets d Device Mare d Devices and Printers Bl Display Q tese of Access Centes ue s Rich Simms AppData Locallow Sun Java Deploymentlcache Change Uns onem LE Folder Options da Forts 4 Getting Started Cached Applications and Applets ly HomeGroup ES HP Cocisense Network settings are used when making Internet connections By default Java will Disk Space use the network settings in your web brow
17. Need Help Free Java Download Why download Java Java technology allows you to work and play in a secure computing emironment Java allows you to play online games chat with people around the world calcutate your mortgage m CIS 90 Lesson 11 R 11 pw vi editor Objectives e Create and modify text files e Quiz e Questions from last week e more on grep e Review on processes e The vi editor e Wrap up CIS 90 Lesson 11 i R 11 ru Questions 11 EGIT NES pie OES Questions Lesson material Labs Tests How this course works Test 2 Post Mortem Missed Q4 15 Missed Q24 15 Missed Q30 14 Missed Q28 13 Missed Q25 13 Missed Q29 12 Missed Q26 12 Missed Q21 12 Missed Q2 10 Missed Q17 Missed Q27 Missed Q23 Missed Q13 0 8 0 Missed Q2 1 9 9 8 Missed Q1 21 tests submitted CIS 90 Lesson 11 Test 2 Results 7S FEE Missed Q16 Missed Q11 Missed Q3 6 Missed Q22 Missed Q19 Missed Q12 Missed Q9 4 Missed Q6 4 Missed Q15 Missed Q14 Missed Q7 Missed Q5 Missed Q8 Missed Q10 0 Missed Q1 0 6 6 5 4 4 2 2 1 e 6 tests not submitted Extra Credit Missed Q31 18 Missed Q32 17 Missed Q33 14 Correct answers are in home cis90 answers on Opus 14 CIS 90 Lesson 11 CIS 90 Test 2 3 5 IS EES ES ES DS Zee ef Se ee ee ee ee ee ee ee ee i PPP PP P P P P P P P P P P P P P P
18. P LL Pop LL 1 LLL P P PP P LLL LL P PPP PPP qo L PP P P P P P P P P P P P LL P P P qo LL 3 O LT T1 I Jd x5 T p d DL I py 4 Lol gr gp pr L 25 20 No Practice A 15 m Practiced 2 Hrs 10 5 0 EE dd ee 12 00 14 24 16 48 19 12 21 36 0 00 Time Working the practice test tended to result in higher scores and shorter completion times 15 CIS 90 Lesson 11 KM Hi 1 1 dei Q16 There is a file in the etc directory named passwd This file has information on all user accounts including usernames UIDs first and last name etc What is the absolute pathname of this file To check your answer lesson 4 simben90 sun hwa ii ls etc passwd etc passwd pi ts S E u U JM 2d 5 EN DR M P a gt ag hat M ii erg NC i 4 Ce http www mountvernon org content revol http www sodahead com united states vvhat color vvas george vvashingtons his staff vvelcoming a provision train utionary war princeton white horse 1 6 white horse question 636725 http kids britannica com comptons art 55428 General George Washington and CM Co CIS 90 Lesson 11 est 1959 Re Questions about the Final Exam Oby Rich Simms Sun Apr 13 2014 11 05 am just reconfigured son of opus as a lest 2 system You can use it for review of what we ve learned so far or to better understand any questions missed on the last test To login use ssh p 2220 username son of opu
19. SBONET Ma mut 3 Keep your hands OFF THE MOUSE don t use it in vil 106 CIS 90 Lesson 11 est 1959 Type a EP simben90 opus n What is your name NAME n What is your favorite bone BONE Hi NAME your favorite bone is SBONET Ma Ma Ma 1 Ma Ma Ma Keep your hands OFF THE MOUSE don t use it in vil 107 CIS 90 Lesson 11 est 1959 e Type wq EP simben90 opus echo n What is your name NAME n What is your favorite bone BONE Hi NAME your favorite bone is SBONET Ma mt Ma Im Ma Ma Ma Keep your hands OFF THE MOUSE don t use it in vi 108 p M Tap the enter key 4 106 4 106 4 Tryo e A ete rte a t baer en home cis90 simben 14 d TEE 14 d TEE S vi dogbone d E 2 14 d boy 2 TEM 76 te Tryo e Tryo e A 4 4 Tryo e Tryo e Tryo e 4 4 4 109 E I Tse X I 129 X I 129 X I 129 A4 A4 A4 CIS 90 Lesson 11 Add execute permissions and try your new script home cis90 simben chmod x dogbone home cis90 simben dogbone What is your name Benji What is your favorite bone chicken Hi Benji your favenite bone ssehickenm home cis90 simben 110
20. fench posts this weekend mE Later Ben You are composing a message and you spot some typos CRUD what can you do 123 CIS 90 Lesson 11 bin mail and vi home cis90 simmsben mail roddyduk Subject Good bones Hey Duke I really appreciate thatbone you sent me last week Let me knwo if you want to go mark some fench posts this weekend mm Later Ben Well you could try the vv command 124 CIS 90 Lesson 11 EP simmsben opusi Bey Duke I really appreciate thatbone you sent me last week Let me knwo if you want to go mark some fench posts this weekend u na nu u u A I tmp RegY2d2b 6L 141C The message is loaded into vi where changes or additions can be made wq is used to save and quit vi 125 CIS 90 Lesson 11 8 11 pw bin mail and vi home cis90 simmsben mail roddyduk Subject Good bones Hey Duke I really appreciate thatbone you sent me last week Let me knwo if you want to go mark some fench posts this weekend Later Ben VV Continue Bat home cis90 simmsben The earlier text with typos is still Showing however the corrected version is what is actually sent 126 CIS 90 Lesson 11 11 pru bin mail and vi home cis90 roddyduk mail Mail version 8 1 6 6 93 Type for help var spool mail roddyduk 1 message 1 unread gt U 1 simmsben opus cabril Mon Nov 10 20 25 22 782 Good bones amp 1 Message 1
21. is finished 88 CIS 90 Lesson 11 Job Control Managing jobs home cis90ol simmsben jobs 1 Done sleep 120 Background jobs are 2 Done all done sleep 110 89 Review of Load Balancing CIS 90 Lesson 11 Load Balancing The at command e reads from stdin for a list of commands to run e runs those commands at the specified time e Any output from those commands will be emailed Use atq and atrm to manage scheduled commands Use at to schedule commands to run in the future 91 at at at at at CIS 90 Lesson 11 Load Balancing Managing queued jobs now 5 minutes now 1 hour 7 58AM 7 47PM 5 5 2012 teatime Ways to specify future times 92 CIS 90 Lesson 11 Kk I pw est 1959 re home cis90 simben 25 2011 11 12 20 2011 12 12 2 1 Z4 3 ped els 26 2011 11 12 24 2011 11 12 home cis90 simben home cis90 simben 2 2011 11 12 28 2011 12 12 2 7 2011 11 19 26 2011 11 12 home cis90 simben Load Balancing Managing queued jobs S atq 14 09 a simben90 03 00 simben90 12 10 a simben90 16 00 a simben90 12 14 a simben90 5 atrm 24 S atq 14 09 a simben90 03 00 simben90 12 10 a simben90 16 00 a simben90 The atq command lists jobs queued to run in the future The atrm command is used to remove jobs from the queue Note The jobs command lists processes gt jobs running or suspended in the background and is NOT used for at c
22. 0 00 00 02 grep home cis90 guest 5 S RIE ret FS UID PID PPID C PRI NI ADDR SZ NOHEN ZI TIME CMD 1001 6283 6270 0 80 0 1308 pts 1 00 00 00 bash 1001 8841 8820 0 80 B ZHOSM 3 00 00 00 sshd 1001 8842 8841 0 80 0 1308 pts 0 00 00 00 bash OR 1001 9032 8842 23 80 0 1369 pts 0 00 00 03 grep home cis90 guest su ln nuncius S Review of Signals CHR CIS 90 Lesson 11 est 1959 PLATE a COMMERCIAL CODE SIGNALS EXAMPLES OF THE SEVERAL HOISTS WHIJH CAN BE MADE HAVING TWO Wheo a word contains two letters of the same name begin or be in the 2nd Holst and on ita 3rd ooourrenos it must begin or be in the 3rd Hoist I DoWo l Am about fo Sa l Abandon Mo Vessel LATITUDE amp LONGITUDE SIGNALS CODE FLAG OVER 2 FLAGS Civitas Sener GAATRAL SIGNAL le Lahtude Hude 9 East Longitude NUMERAL TABLE GENERAL VOCABULARY GEOGRAPHICAL SIGNALS CODE FLAG UNDAR 2 FLAGS I FLAG SIGNAL Te X K i Tons oF Cog Right turn Slow or stop Left turn 69 CIS 90 Lesson 11 is FK pu A process e IS provided with parsed expanded options and arguments from the shell e may read from stdin may write to stdout e may write error messages to stderr and may get interrupted from time to time by a signal A process is a program that has been loaded into memory and is either running executing instructions or waiting to run a C
23. 2 You earned 30 points out of a possible 30 Lab 3 You earned 30 points out of a possible 30 Lab 4 You earned 29 points out of a possible 30 You ve earned 15 points of extra credit You currently have a 109 grade in this class 166 out of 152 possible points Jesse is a CIS 90 Alumnus He wrote this python script when taking the course It mines 25 data from the website to check how many of the available points have been earned so far CN Lo eg CIS 90 Lesson 11 4 11 nu CIS Lab Schedule http webhawks org cislab N ad TT i Rich s Cabrille m CIS Lab x 5 Cabrillo Colle x garichsimms Y x risimms cab x 3 Choice of file x gt Q 5webhawks org cislab 2 CIS Lab amp Datacenter Ans campus Not submitting tests or lab I Home Resources NETLAB Location work Announcements We ve moved to the newly refurbished Building 800 Use the entrance to the MESA Lab on the second floor Come by and check it out Would like some help CIS Lab Spring 2014 Today EB ED Feb 16 22 2014 Print Week Month Agenda Sun 2 16 Wed 2 19 Thu 2 20 Fri 2 21 Sat 2 22 Come to the CIS Lab to work with classmates lab assistants and instructors on Lab assignments Goog je Calendar Rich is in the lab Wednesdays and Fridays from 3 30 6 00 PM 26 est 1959 Pre CIS 90 Lesson 11 Free CIS 90 Tutoring Av
24. 78 line 0 intr C quit N erase kill U eof D eol lt undef gt eol2 lt undef gt swtch lt undef gt start Q stop S Susp F rprnt R werase W lnext V flush O min 1 time 0 rsimms opus stty a speed 38400 baud rows 39 columns 84 line 0 intr C quit N erase kill U eof D eol swtch lt undef gt start Q stop S lnext V flush O min 1 time 0 lt undef gt eol2 undef rprnt R werase W Why does the keystroke to send a Suspend SIGTSTP or 20 signal differ between roddyduk F or Ctrl F and rsimms Z or Ctrl Z 142 EJ CD CED EIER CED COC EL E cr Ta rsimms opus sleep 5 Ed PID 7728 is stopped Stopped Job Control A feature of the bash shell CIS 90 Lesson 11 Ctrl Z or Ctrl F sends SIGTSTP 20 signal e Stops suspends a foreground process rs F S UID SR 201 ONES 201 NET 201 OS 201 O R 20 rsimms opus rsimms opus PID 0500 0909 6203 6204 7130 ps 1 PPID 9902 5368 6200 6203 3309 C PRI O 0 O 0 0 TS 76 T5 T5 T8 Ctrl Z is tapped which stops the sleep command u rsimms NI ADDR SZ O 0 O 0 0 2460 1165 2491 1165 062 TTY P pts 0 P pts 6 pts 0 TIME 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 m T 1 i 4 CMD sshd bash sshd bash ps 143 CIS
25. CIS 90 Lesson 11 Lesson Module Checklist Slides WB Flash cards Page numbers 15 minute quiz Web Calendar summary Web book pages Commands Lab tested and uploaded Tech file email for Lab 9 ready Materials uploaded Backup slides CCC info handouts on flash drive Spare 9v battery for mic CIS 90 Lesson 11 Introductions and Credits Jim Griffin Created this Linux course e Created Opus and the CIS VLab e Jim s site http cabrillo edu jgriffin Rich Simms e HP Alumnus e Started teaching this course in 2008 when Jim went on sabbatical Rich s site http simms teach com And thanks to e John Govsky for many teaching best practices e g the First Minute quizzes the online forum and the point grading system http teacherjohn com CIS 90 Lesson 11 me E i pu Student checklist 1 Browse to the CIS 90 website Calendar page e http simms teach com e Click CIS 90 link on left panel Click Calendar link near top of content area Locate today s lesson on the Calendar 2 Download the presentation slides for today s lesson for easier viewing 3 Click Enter virtual classroom to join CCC Confer session 4 Connect to Opus using Putty or ssh command CIS 90 Lesson 11 i H 1 LE Instructor Rich Simms Dial in 888 450 4821 Passcode 761867 8 pa va 4 Enrique G Enrique Ri Jon M 7 lon Ki Jordan AN tt se hn Po Car iKiernan Maria Mathew M
26. IS 90 Lesson 11 Signals The result of FEN DIE sen ding process gets signal 20 signal to a SIGTSTP process e be ignored e default action die e execute some predefined function 71 SIGHUP SIGINT SIGQUIT SIGILL SIGTRAP SIGIOT SIGBUS SIGFPE SIGRILL SIGUSR1 SIGSEGV SIGUSR2 SIGPIPE SIGALRM SIGTERM CIS 90 Lesson 11 Signals Hangup POSIX Terminal interrupt ANSI Terminal quit POSIX Illegal instruction ANSI Trace trap POSIX IOT Trap 4 2 BSD BUS error 4 2 BSD Floating point exception ANSI Kill Can t be caught or ignored POSIX User defined signal 1 POSIX Invalid memory segment access ANSI User defined signal 2 POSIX Write on a pipe with no reader Broken pipe POSIX Alarm clock POSIX Termination ANSI Ctrl C Ctri Use kill I to see all signals 72 CIS 90 Lesson 11 E E I f m SIGSTKFLT SIGCHLD SIGCONT SIGSTOP SIGTSTP SIGTTIN SIGTTOU SIGURG SIGXCPU SIGXFSZ SIGVTALRM SIGPROF SIGWINCH SIGIO SIGPWR 16 Signals Stack fault Child process has stopped or exited changed POSIX Continue executing if stopped POSIX Stop executing cant be caught or ignored POSIX Terminal stop signal POSIX Ctrl Z or Ctrl F Background process trying to read from TTY POSIX Background process trying to write to TTY POSIX Urgent condition on socket 4 2 BSD CPU limit exceeded 4 2 BSD File size limit exceeded 4 2 BSD Virtu
27. PPID 14 5 CIS 90 Lesson 11 Fr pu Repeat Step PID 1570 PID 1570 PPID 1476 PID 1476 PPID 1475 The child process makes an exit system call when it has finished The parent bash process wakes up the child process is killed and we are ready to start the process all over again with the next command 66 dia RS Le Cal VTA Process activity e See if you can do a ps command that illustrates what happens when a user runs a long grep command e The ps output should show parent bash S Sleeping while the child grep command is either R Running or in D Uninterruptible sleep IO e Start a second login session to observe your processes Write your grep PID and status into the chat window when done home cis90 simben grep r d dar usr lib usr src d simben90 osiab FEAR BR Sate AER s Ps lu simben90 ib pe nacen breue j Resolver Recurse pm Purpose Do that hot pototo dance gs RI grep usr lil een Permission denied 1001 8841 8820 0 80 0 2899 00 00 00 sshd gt p ce jeni l 5 1001 8842 8841 0 80 0 1308 2 pts 0 00 00 00 basn OD 1001 9032 8842 21 80 0 1369 2 pts 0 00 00 02 grep home cis90 quest ps lu simben90 FS UID PID PPID C PRI NI ADDR SZ NCHAN TTY TIME CMD 45 1001 6283 6270 0 80 0 1308 2 pts 1 00 00 00 bash 5 1001 8841 8820 0 80 gU EHE 00 00 00 sshd 0 S 31001 8842 8841 0 80 0 1308 2 pts 0 00 00 00 bash O D 1001 9032 8842 21 80 0 1369 7 pts
28. PS daemon print service running right now home cis90 simben ps ef grep cups root 1 0 Jul31 00 00 04 eupsd C etc cups cupsd conf simben90 27027 26966 0 08 47 pts 3 00 00 00 grep cups Yes it is with PID 6251 30 CIS 90 Lesson 11 KW R pu grep practice e s the cronjob daemon crond running right now Type the crond PID into the chat window CIS 90 Lesson 11 i 1 Ll pru grep usage search output of a command Is the Apache web server httpd installed This shows all installed This searches for package package names names containing httpd home cis90 simben rpm qa grep httpd DDPDOCDODLSeA2 2 19919 6 005108 008 22 090 Peer Don ARS Rei OE SS EE httpad manusal 25 2 15 15 01060 centos l noarehn Yes version 2 2 15 has been installed 32 EI CIS 90 Lesson 11 grep practice e Has the mysal server package been installed on Opus e If installed on Opus type the version of mysql in the chat window CIS 90 Lesson 11 grep usage search output of a command When were the last 5 times I logged in home cis90 simben last grep LOGNAME head n5 simben90 pts 0 simben90 pts 6 simben90 pts 5 simben90 pts 4 simben90 pts 1 DUE Oi ee le Los od UC a 20 2 LOS 04222 00 0072 dS L Mon Wed Wed Wed Wed Apr Apr Apr Apr Apr PAS 18 18 18 18 05 12 39 la 48 48 12 09 48 06 still logged in 16 51 04
29. T CIS 90 Lesson 11 Running process gets a signal What is signal 18 CIS 90 Lesson 11 E li pu Signals SIGSTKFLT 16 Stack fault SIGCHLD 1 SIGSTOP 19 SIGTSTP 20 SIGTTIN 21 SIGTTOU 22 SIGURG 23 SIGXCPU 24 SIGXFSZ 25 SIGVIALRM 26 SIGPROF 2 SIGWINCH 28 SIGIO 29 SIGPWR 30 Child process has stopped or exited changed POSIX Stop executing can t be caught or ignored POSIX Terminal stop signal POSIX Ctrl Z or Ctrl F Background process trying to read from TTY POSIX Background process trying to write to TTY POSIX Urgent condition on socket 4 2 BSD CPU limit exceeded 4 2 BSD File size limit exceeded 4 2 BSD Virtual alarm clock 4 2 BSD Profiling alarm clock 4 2 BSD Window size change 4 3 BSD Sun I O now possible 4 2 BSD Power failure restart System V Signal 18 continues a stopped process isn t that what bg does 148 CIS 90 Lesson 11 11 pru The bg command is used to resume a stopped process home cis90 roddyduk sleep 60 Ctrl F or Ctrl Z typed here 1 Stopped sleep 60 home cis90 roddyduk bg l sleep 60 amp home cis90 roddyduk Jobs Lie BRunn ng sleep 60 amp home cis90 roddyduk Jobs Lie BRunn ng sleep 60 amp home cis90 roddyduk Jobs 1 Done sleep 60 home cis90 roddyduk bg resumed the stopped process which runs till it is finished 149 est 1959 CIS 90 Lesson 11 m E D l
30. ailable http www cabrillo edu services tutorials C 3 www cabrillo edu services tutorials Breakthroughs Ds College ABOUT ACADEMICS CAREERS A yv Campus Life Learning Resources Student Services Directories A Z ADMISSIONS CLASS SCHEDULES REGISTRATION WEBADVISOR Most sought pages M TUTORIALS ANNOUNCEMENTS amp DEADLINES New subjects for Spring 2014 American Sign Language Computer Applications Business Technology CABT Computer and Information Systems CIS History 17A Welcome to the Tutorials Center CONTACT INFORMATION We offer FREE peer tutoring to Cabrillo students who are enrolled in the course s for which they need help Tutorials Center h e Tutoring is by appointment The days and Location Room 1080A Learning times of tutoring sessions are established by the office e Sessions are weekly and for the duration of the semester e Tutoring sessions are scheduled in small groups Sessions last 1 2 hours depending on the class Occasionally sessions may be one to one but that is not Resource Center Phone 831 479 6470 Email tutorialscenter cabrillo edu Coordinator Lori Chavez guaranteed Phone 831 479 6126 e Come directly to the TC office to schedule second floor of library Email TTD UTERE The following classes are being tutored for Spring 2014 Hours Monday Thursday i 9am 5pm Q Accounting 1A 1B 6 54A 151A 159 163 Friday 9am 1pm Q American Si
31. al alarm clock 4 2 BSD Profiling alarm clock 4 2 BSD Window size change 4 3 BSD Sun I O now possible 4 2 BSD Power failure restart System V Use kill I to see all signals 79 CIS 90 Lesson 11 me E 11 ru Signals E Signals are asynchronous messages sent to processes They can result in one of three courses of action 1 be ignored 2 default action die 3 execute some predefined function Signals are sent Using the kill command kill PID Where is the signal number and PID is the process id e if no number is specified SIGTERM 15 is sent Using special keystrokes limited to just a few signals limited to when you have control of the keyboard Use kill I to see all signals CIS 90 Lesson 11 est 1959 Target Practice 75 CIS 90 Lesson 11 Activity 1 Run the annoy program 2 Try sending it a SIGINT with Ctrl C 3 Try sending it a SIGQUIT with Ctri 4 Bring up another terminal and try signals 1 through 64 Use ps u SLOGNAME to find the annoy PID Try kill 1 PID Try killall 1 annoy Try kill 2 PID OR Try killall 2 annoy Try kill 3 PID Try killall 3 annoy e and so forth e and so forth 5 Write the signals that kill annoy into the chat window 76 mJ zu Using amp to run acommand in the background CIS 90 Lesson 11 11 pru Job Control Using amp to run a command in the background 3 Applicati
32. contents are read using the kernel dev null stdin find lost found Permission denied stderr find var empty sshd Permission denied find var log sssd Permission denied snipped gt CIS 90 Lesson 11 bs FK i look like A process Is provided with parsed amp expanded options and arguments from the Shell may read from stdin may write to stdout may write error messages to stderr and may get interrupted from time to time by a Signal The find process is running 62 CIS 90 Lesson 11 A Mo iz ru Nap Step 1 Prompt 2 Parse Mr icem Applications 3 Search 4 Execute Kernel 5 Nap 6 Repeat 63 CIS 90 Lesson 11 A Mi i pw Nap Step PID 1570 PID 1570 PPID 1476 PID 1476 The PS command shows Benji s find command is running as a child process while the parent bash shell sleeps PPID 1475 PPID 1475 rsimms oslab S ps 1 u simben90 F 3 UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD 5 S 1001 1475 1470 0 80 0 3392 00 00 00 sshd 0 1001 1476 1475 0 80 0 1308 pts 1 00 00 00 bash OR 1001 1570 1476 40 80 0 1179 pts 1 00 00 00 find R Running PID 1570 find S Sleeping PID 1476 bash 64 CIS 90 Lesson 11 e Mo 11 ru ee F4 i Y r i 1 8 7 System Commands Applications Kernel Repeat Step 1 Prompt 2 Parse 3 Search 4 Execute 5 Nap 6 Repeat 65 PID 14 6
33. ddyduk edits file usr bin spell usr bin spell Bourne shell script text executable home cis90 roddyduk edits cat usr bin spell bin sh aspell list mimicks the standard unix spell program roughly OK the actual per og list mode none sort u BR command is aspell home cis90 roddyduk edits 132 CIS 90 Lesson 11 WV T 11 pw spell command ASPELL 1 Aspell Abbreviated User s Manual ASPELI 1 NAME aspell interactive spell checker SYNOPSIS aspell options command DESCRIPETON aspell is a utility that can function as an ispell a replacement as an independent spell checker as a test utility to test out Aspell features and as a utility for managing dictionaries COMMANDS command is one of help display the help message c check file to spell check a file There must be a way to add CIS but lets try google 133 CIS 90 Lesson 11 est 195 1 Google x Mug of Vi No Starch Press x 3 Creating your own persona Qo blog samat org 2008 11 02 creating your own personal aspell dictionary Ww Q Gr SafeWeb identity Safe SAMAT ORG BLOG WIKI MBLOG Search all Search Creating your own personal aspell dictionary Bv SAMAT JAIN NovengER 2 2008 4 23pm Something that has bothered me forever is that applications that use GNU aspell for spell checking kept O W t O a d d V O r d S marking my name as a misspelling
34. e Lets start up 3 sleep commands and suspend each of them Note The sleep command is a simple way to run a command that will take awhile to finish sleep 120 will last 120 seconds before it is finished 86 CIS 90 Lesson 11 Job Control Managing jobs home cis90ol simmsben jobs 1 Stopped sleep 120 lle Stopped sleep 110 3 Stopped sleep 100 home cis90ol simmsben ps 1 B S5 UID PID PPID C PRI NI ADDR 54 WCHAN TTY OS 1082 5364 5363 0 75 O 1168 wait pts 2 0 1082 5452 5364 Q 75 D 929 finish pts 2 0 1082 5453 5364 0 75 D e 929 finish pts 2 0 1082 5454 5364 0 75 D 929 finish pts 2 O R 1082 5459 5364 0 77 0 1054 pts 2 Note all three processes are sTopped QUE QUE 00 Ds Ds TIME 00 00 00 00 00 00 00 OO 00 OO CMD bash sleep sleep sleep DS 67 home cis90ol simmsben 2 sleep 110 amp home cis90ol simmsben 1 Stopped 2 Running 3 Stopped home cis90ol simmsben 1 sleep 120 amp home cis90ol simmsben 2 Running 3 Stopped CIS 90 Lesson 11 R 11 pw Job Control Managing jobs S bg 2 S Jobs S bg 1 S Jobs home cis90ol simmsben fg 3 sleep 100 Let s resume job 2 in the background sleep 120 sleep 110 amp sleep 100 Let s resume job lin the background sleep 120 amp sleep 110 amp sleep 100 Let s resume job 1 in the foreground At this point we lose control of the keyboard again until sleep 100
35. e your cursor is on u Undoes the last command you executed r Undo the undo redo Repeats the last command you executed string Searches for the string of characters in the file n Finds the next occurrence of the current search string looking down the file N Finds the next occurrence of the current search string looking up the file Changes the case of the current character 119 0 00 00 Ark 3 Use vi to edit your edits text err file Copy your corrected file into the chat window when finished 120 3 3 Google x Y ss Rich s C gal 8 unrea CIS 90 Lesson 11 m Connect QU ft amp http vim wikia com wiki Main_Page wikia search this wiki Home Community portal To do Top content Folding category Searching category Fd Create a new article El Upload a new image Recent changes Random page Help Special pages Latest activity 1 592 articles on this wiki Folding 5 hours ago by JohnBeckett f Right click in Windows Explorer to open gvim in explorer mode A hours aan hv InhnBackatt Create a new wiki Redirected from Main Page happy town Welcome to the Vim Tips wiki CIS 90 La CIS 90 La a This wiki is about the editor Vim We aim to exchange tips and tricks with other Vim users Please help by improving or adding comments to any tip If you are new to Vim we have plenty of tips that will help you get
36. ectory searched usr bin bin directory 5th directory searched usr local sbin 6th directory searched usr sbin 7 directory searched sbin 8th directory searched home cis90 simben bin 9th directory searched home cis90 simben bin 10th directory searched 56 CIS 90 Lesson 11 e Mo 11 ru ee F4 i Y r i 1 8 7 System Commands Applications Kernel Execute Step 1 Prompt 2 Parse 3 Search 4 Execute 5 Nap 6 Repeat 57 CIS 90 Lesson 11 me E pu Execute Step PID 1570 PID 1570 PPID 1476 PID 1476 PID 1476 VE m PID 1476 PPID 1475 PPID 1475 PPID 1475 bash executes the find command by cloning itself with a fork system call to create a new child process With an exec system call the new child process is overlaid with the find code instructions bash sleeps by making a wait system call while the find child process runs The child process makes an exit system call when it has finished After that the parent bash process wakes up and the child process is killed 58 CIS 90 Lesson 11 Execute Step home cis90 simben find name egg 2 dev null stdout Args Options name 1968 egg home cis90 lovben 1968 egg home cis90 wismar basket 1968 egg home cis90 perste basket 1968 egg home cis90 perste 1968 egg home cis90 cis 1968 egg home cis90 paljay basket 1968 egg snipped gt directory
37. er in the field of computer technical support Courses provide hands on experience with computer hardware and software basic networking and help desk con cepts The program prepares students to pass in dustry accepted certifications like CompTIA CIS 90 Lesson 11 Network amp System Administrators are in Demand 46 000 Average Starting Salaries Most companies need qualified Network and System Administrators Register Now Cabrillo College s Computer Networking and Sys tem Administration program prepares students to work in the Information Technology IT industry in general and more specifically in computer net working and system administration After com pleting the program you will have the skills need ed to transfer to a four year college or university and complete your degree Cabrillo transfer stu dents excel at four year colleges and universities Got Questions If you are interested in learning more about the Computer Science program contact the Computer Science department at Cabrillo College today Or attend our Tech meetup shown below Technology Career Meetup When April 18 2014 1 00 2 30 PM Where Cabrillo College Room 828 f 1 bi Software Developers are in High Demand 61 741 Average Starting Salaries Companies such as Facebook always need qualified software developers Register Now To become a qualified software developer you need a bachelor s degree in computer sc
38. gn Language ASL 1 2 WE MAP DIRECTIONS 8 PARKING Biology 4 5 6 mr Biz DEPARTMENT STAFF amp Q Computer Applications Business Technology CABT 31 38 41 101 i FACULTY DIRECTORY 157 160 Computer and Information Systems CIS 81 90 172 Q Chemistry 1A 1B 2 30A 30B 32 A cis90lab01 pdf sl meeting 2 jnip Robertle JPG Credit Re PDF Show all downloads x Matt Smithey All students interested in tutoring in CIS 90 172 and 81 classes need to come directly to the Tutorials Center to schedule register and fill out some paperwork This is just a one time visit The tutoring will take place at the STEM center and they will log in and log out on a computer you have designated I will figure out exactly what that means Matt is available M 9 00 5 00 T 9 11 and 2 5 Wed 9 12 and Th 9 11 and 3 5 27 CIS 90 Lesson 11 grep workout CIS 90 Lesson 11 x FF Ll iis Some perfect times to use the grep command 1 To search through the output of a command for some text command grep text string 2 To search inside one or more files for some text grep text string filel file2 filen 3 To search recursively inside all files in a portion or all of the UNIX file tree for some text grep R text string directory 29 CIS 90 Lesson 11 1 11 pru grep usage search output of a command Is the CU
39. ience Register now for Cabrillo College s program in Computer Science After completing the program you will have the development and programming skills needed to transfer to a four year college or university and complete your degree Cabrillo transfer students excel at four year colleges and universities 21 CIS 90 Lesson 11 Final Exam Test 3 final exam Must be face to face or proctored not online using CCC Confer Room 828 on campus Timed test no 11 59PM grace period Test 3 the final exam Time e DOAM 9 50AM in Room 828 Materials Test download If you are a long distance student contact the instructor for options gt CIS 90 Lesson 11 Run mie ti EL Check your progress on the Grades page If you haven t already send me a student survey to get your LOR secret code name Graded labs amp tests are placed in your home directories on Opus Answers to labs tests and quizzes are in the home cis90 answers directory on Opus 23 CIS 90 Lesson 11 Current Point Tally As of 4 15 2014 Points that could have been earned Total Points 7 quizzes 21 points 7 labs 210 points 80 to 89 996 448 to 503 B 2 tests 60 points 2 forum quarters 40 points 6080 to 69 9 336 to 391 D Total 331 points No pass alatar 61 202 of 331 points legolas 87 291 of 331 points anborn 81 270 of 331 points marhari 66 220 of 331 points aragorn 85
40. ike C Michael FE Mike Nick L Patrick Rebecca Ricardo Robert Steve L l EEU Les a j NEN 3 CIS 90 Lesson 11 74 11 pw Quiz Please answer these questions in the order Shown See electronic white board email answers to risimmstcabrillo edu answers must be emailed within the first few minutes of class for credit 5 CIS 90 Lesson 11 File Edit View Tools Window Help ESC v AUDIO 8 VIDEO Connect session to Teleconference PARTICIPANTS MAIN ROOM 2 SOO 7h Session now connected Rich Simms Moderator You lej af DIE to teleconference XL You Teleconference Is on Red dot means Imm Use teleconferencing not mic Should be greyed out Eee a Keep wireless mic transmitter away from cell phone and podium if excess static occurs CCC Confer 0 RIC e amp 3 File Edit View Tools Window Help cis90lesson07 pdf Foxit Reader v AUDIO amp VIDEO MAIN ROOM 3 a pet qe v CHAT AM Tal eleconference joined the Main Room 6 51 AM CIS 90 Lesson 11 1 WW at SharePoint Hd a Ole File Edit View Tools Comments Forms des us B ds n simms teach c com d layout and share apps OC s cis90 c is 90 T EST 1 F Fal 12pdf Part 1 Flashcards questions 1 point each Ie ec asit for slides a Al A2
41. les in all or part of the file tree Where does the PS1 prompt variable get set home cis90 simben grep R PS1 etc bash SHOME 25 dev null etc bash completion d git f PS1 u h WS git ps1 ss JS etc bashrc SPS1 s vV S T amp amp PS1 u h NW NNS etc bashrc PSi u h 1 W S home cis90 simben class labs lab04 graded 21 PS1 PWD home cis90 simben class exams test01l graded A32 PS1 d home cis90 simben lab04 graded 21 PS1 SPWD S home cis90 simben testOl graded A32 PS1 Nd It is set more than once during login We will learn in a future lesson that the one in bash profile is done last and is what you end up using 42 EI CIS 90 Lesson 11 grep practice e Find the file in the usr lib portion of the file tree that contains hot pototo dance yes potato is misspelled Type the absolute pathname of the file in the chat window 43 CM Weg CIS 90 Lesson 11 4 1 i grep usage search inside files in all or part of the file tree EP simben90 oslab 7 home cis90 simben grep Benji etc passwd simben90 x 1047 190 Benji Simms home cis90 simben bin bash home cis90 simben 5 home cis90 simben 5 home cis90 simben 5 grep color Benji etc passwd isimben90 x 1047 190 Benji Simms home cis90 simben bin bash home cis90 simben 5 home cis90 simben home cis90 simben grep R color Benji etc p etc pass
42. lled home using vi and insert the following line cd Clear echo This is the home directory of SLOGNAME A Instructor remember to mail Use the chmod command to set the permissions on the file home to rwxr xr x push i edd Bands d aid lit alga D Wil ae Annie nci students the tech file Move this shell script you have just made to your bin directory so that you may run it from anywhere on the system Congratulations you have just written your first shell script Run the spell command on the file small town Se ie td one cis90 lab09 mail tech all Make a permanent list of the above misspelled words by running the spell command again but this time redirect the output to a file called words 129 w A Ww i I Fi j i Ra A Ey A langent on Spell CIS 90 Lesson 11 spell command home cis90 roddyduk edits cat text Welcome to the CIS 90 class home cis90 roddyduk edits spell text CLS spell command flags CIS as misspelled word How can we add CIS to the dictionary 131 CIS 90 Lesson 11 i R 1 dei spell command home cis90 roddyduk edits cat text Welcome to the Cis 20 class 1 How can we add CIS home cis90 roddyduk edits spell text to the dictionary CARS home cis90 roddyduk edits man spell Hmmm No man page No manual entry for spell for spell 222222222222 home cis90 roddyduk edits type spell spell is hashed usr bin spell home cis90 ro
43. ome cis90 ramjua 1968 egg home cis90 lefnic basket 1968 home cis90 hormat 1968 egg home cis90 simben egg egg nee egg CI egg On the next slides we will walk through each of the six steps the shell performs for this command 46 CIS 90 Virtual Classroom ai I pw Prompt Step 2 1 Prompt 2 Parse 3 Search 4 Execute System Commands Applications Kernel 5 Nap 6 Repeat 48 CIS 90 Lesson 11 Prompt Step u ses PS1 v ariable C The shell prompt is output from the bash shell program directed to your terminal device e Benji is using the bash shell There are many other shells such as sh ksh and csh The last field in the line for his account in etc passwd determines the shell that is run when he logs in e The bash program resides in the bin directory The command prompt appearance is defined by the PS1 variable You can output a prompt yourself using echo PS1 home cis90 simben grep SLOGNAME etc passwd simben90 x 1001 190 Benji Simms home cis90 simben bin bash home cis90 simben ls 1 bin bash rwxr xr x 1 root root 874248 May 10 2012 bin bash 49 CIS 90 Lesson 11 Prompt Step home cis90 simben Benji types this find command in response to the shell prompt 51 CIS 90 Lesson 11 A Mo iz ru 3 Parse Step ee F4 i Y r i 1 8 7 System Command Applications Kernel
44. ommands 93 CIS 90 Lesson 11 R pu Load Balancing Try it yourself with your own terminal device and username rsimms oslab tty dev pts 4 ef These should match rsimms oslab S at now 2 minutes at gt echo Take Benji for a walk mail s walk the dog SLOGNAME at echo Read your mail gt dev pts 4 cm EE th 112 OD lab piane 003 US nb 02 rsimms oslab atq Ini dl ake oe NZ ars IS rsimms oslab 5 Type what happens in the chat window 94 CIS 90 Lesson 11 text editors 95 CIS 90 Lesson 11 R 11 pu There are lots of text editors Windows notepad P Text editors and word processors are notepad Kir textpad I eren Mac Word processors are used by many different people to create documents TextWrangler id 3 containing text and graphics Linux gedit e Text editors are used by programmers emacs to develop software and web designers nano to create web sites Vi jove Thanks Maria 96 CIS 90 Lesson 11 Clipboard Font rt as References Mailings Review Vie XE ss ud e 9 HJ INJ SM 18 B V H0 Fj tS 7 97 Ey E IA d xx 3 BeBe te AaBbCcDc AaBbCcDc AaBbC ze RS E Normal No Spaci Headingi Change Editing AP A Aa AA DE s 9 Paragraph Fa Styles fa Wow cq DE CIP RE dq l1 QR Vo VI CG CS qo De gt ae em 2 LJ Y Y Y Y CIS 90 Linux Lab Exerci
45. ons Places System P 99 Med Nov 10 8 03AM ty cis90 4 cis90 eko File Edit View Terminal Help cis90 eko firefox DN Ubuntu Start Page Mozilla Firefox File Edit View History Bookmarks Tools Help After running E Firefox in the foreground it s not possible to Ubuntu Start Page oH enter more commands until Firefox is closed A http start ubuntu com 10 04 gt v fe Most Visited v e Getting Started Latest Headlines v Es Ot gle Search Done Lr cis90 eko Ubuntu Start Page Mo Update Managerl T 78 CIS 90 Lesson 11 hi 11 pru Job Control Using amp to run a command in the background Applications Places System P 1790 Wed Nov 10 8 04AM fy cis90 b 4 cis90 eko File Edit View Terminal Help c1590 eko firefox ci590 eko firefox amp 1 1465 cis90 eko ps Ubuntu Start Page Mozilla Firefox PID TTY TIME CMD File Edit View History Bookmarks Tools Help 1370 pts 0 00 00 00 bash 1465 pts 0 00 00 00 firefox 1470 pts 0 00 00 00 run moz i 1474 pts 0 00 00 01 firefox Most Visited e Getting Started Latest Headlines v 1489 pts 0 00 00 00 ps cis90 eko lt 4 G http start ubuntu com 1 Ubuntu Start Page ENS 7 After running Firefox in the background it is still possible to enter more commands Goo gl E Search Done RI een Update Manager Ubuntu Start Page Mo
46. otion delete from cursor to motion i CUT COPY PASTE s e filename edit filename i 0 etc inyy nY copy lines Copyright c oUm Insert Blonis deus 3 inde deut lins j copy word line A r filename insert filename P indent outdent line 2 YW yy cop rt sh drop to shell E replace text with blank line ip P paste texit alter before cursor o lemd run command end 20 insert new line below above ja 1 insert text after before cursor ir lemd execute cmd and insert output current line sA I insert text end beginning of line SEARCH AND REPLACE iu undo last change WICKED COOL STUFF itxt txt find tx forward or backward i repeat last change P change case un txt find next line that starts MOVING AROUND i xp transpose characters with txt inG move to line 7 J combine current line with next Done i repeat last search backward ih 1 k j left right up down one character imp create a mark called p forward inb my left or right words i P return to p replace text from current i CTRL B F back forward one screen id x yx delete copy text from mark to character i CTRL U D up down one screen f cursor PRESS ig gt to end of line end of file 1 5 n indent lines e Mal m be u http nostarch com mug htm n u CIS 90 Lesson 11 bin mail and vi home cis90 simmsben mail roddyduk Subject Good bones Hey Duke I really appreciate thatbone you sent me last week Let me knwo if you want to go mark some
47. s simm Have fun 1 CIS 90 Lesson 11 Housekeeping CIS 90 Lesson 11 EE l pu Don t wait till midnight tonight to see if this worked Test 1 La b 8 d ue ton ig ht with an earlier time at 11 59pm at cat files out bigshell 5 lab08 at cp lab08 home rsimms turnin cis90 1ab08 S LOGNAME at Ctrl D 2 A check8 script is available for Lab 8 3 Note Lab 9 and five posts due next week 4 You can still send me your photo for our class page if you want 3 points extra credit 19 CIS 90 Lesson 11 est 1959 Careers for CS and CIS students by Rich Simms Sat Apr 12 2014 7 33 am Find out about the following Cabnllo programs and classes next week Computer Support 5pecialists Network amp 5ystem Administrators Software Developers The C5 CIS instructors will be presenting and answering questions at this meetup next week Technology Career Meetup When April 18 2014 Time 1 00 2 30 PM Where Cabnllo College Room 828 Contact Rick Graziani 831 477 3573 Contact Gerlinde ied 631 477 5672 Contact Steve Hoda htto www cabnillo edu academics cis http www cabrillo edu academics computerscience 20 Computer Support Specialists are in High Demand 28 000 Average Starting Salaries Two Year Program Many companies hire qualified Computer Support Specialists Register Now The Computer Support Specialist program at Ca brillo prepares students for a care
48. se Ep Editing files with vi Spring 2012 Lab 9 Editing files with vi In this lab you will use the yi editor to create new files and edit existing files Forum Browse to http opus cabrillo edu forum viewforum php f 46 Check th s wu cis90lab09 docx Microsoft Word non commercial use sco El X Word processors allow a rich set of formatting fonts sizes styles color and graphics to be added to documents Q aa ALSO III DG PS 1089 D V GC Grade Testi if lt 1 then echo usage 0 username exit 1 fi username amp 1 homedirname username 30 file ssubmitted Zusernane Strip 90 off the end report graded Shomedirname name cat etc passwd grep Susername cut f5 d lfirstss echo name cut El d lir r file echo file not found exit 1 Grading TestO0l for first Susername Text editors use color to show the language syntax 977 CIS 90 Lesson 11 98 CIS 90 Lesson 11 On Opus we are actually running VIM home cis90 simben type a vi Vi is aliased to vim vi is bin vi home cis90 simben type vim vim is hashed usr bin vim History he original vi code was written by Bill Joy for BSD Unix Bill Joy co founded Sun Microsystems in 1982 vi for visual vim is an enhanced version of vi 99 La P l l ivy z ot i Aa 2 lS nome cis90 simben S home cis90 simben
49. ser Only advanced users should modify Select the compression level for JAR files None these settings Security Internet Options A aning Sone E Installed Applications and Applets D Keyboard P Mouse fg Notification Ares Icons Set the amount of disk space for storing temporary files Network Settings d Pen and Touch E Perconsicston LS Phone and Modem P Power Options S Programs and Features E Recovery D Region and Language Temporary Internet Files p ME RemoteApp and Desktop Connections A Sound tb Speech Recogrtion MB Synaptics TouchPad 8 0 as H gt r e e E 2 4 Er I Files you use in Java applications are stored in a special folder for quick execution Sync Cente Ma Sytem Tablet PC Settings Taskb d Start Menu E j ee an ee ES TEN later Only advanced users should delete files or modify these settings Mi Troubleshooting a User Accounts r Windows Anytime Upgrade 3 Windows CardSpace bd windows Defences Windows Firewall Windows Live Language Setting dl Viindows Mobility Center Restore Defaults El Windows Update ox one OK Cancel Apply oe T Google Java download en it Free Java Download Java 6 FAQ Download Java for your desktop computer now Au Java Downloads Version 7 Update 13 If you want to download Java for another computer or Operating System click the link below All Java Downloads Mhatis Java gt Dol have java
50. th my pea sea It plainly marques four my revue Miss steaks eye kin knot sea Eye strike a key and type a word And weight four it two say Weather eye am wrong oar write It shows me strait a weigh AS soon as a mist ache is maid It nose bee fore two long And eye can put the error rite Its rare lea ever wrong Eye have run this poem threw it I am shore your pleased two no Its letter perfect awl the weigh My chequer tolled me sew home cis90 simben spell edits spellk chequer eco Vos son Ts ls Een o aspal TN ene ENS no h echo cheque gt gt aspell en pws How would you add chequer the British spelling to your personal dictionary Copy the commands used into the chat window when finished 136 CIS 90 Lesson 11 137 CIS 90 Lesson 11 New commands vi Run vi editor New Files and Directories na na 138 CIS 90 Lesson 11 A FF i pu Next Class Assignment Check Calendar Page on web site to see what is due next week oe Quiz questions for next class How do you send a SIGKILL to one of your own processes e What vi command is used to exit vi without saving any of the changes you made e What vi commands are used for copy and paste 139 CIS 90 Lesson 11 140 AC Ay Cotes CIS 90 Lesson 11 RA R pu est m ih XN he mystery CIS 90 Lesson 11 Signals Special keystrokes S stty a speed 38400 baud rows 26 columns
51. to a new name like Save As w filename saves your file to a new name overwriting any previous data r filename reads in the contents of filename starting from the cursor position e filename replaces the current content with the content from filename s string1 string2 g replaces all stringi with string2 in the file 116 CIS 90 Lesson 11 T FF 11 ii Entering SERT mode From COMMAND mode i Ready to insert characters immediately before the current cursor position I Ready to insert characters at the start of the current line a Ready to append characters immediately after the current cursor position A Ready to append characters at the end of the current line o Ready to input characters in a new line that opens up below the cursor O Ready to input characters in a new line that opens up above the cursor 117 CIS 90 Lesson 11 T FF 11 ii Vi Cut Copy Pasting Commands Use in COMMAND mode x Deletes the current character r Replace the current character with the character you type next dw Deletes the current word dd Deletes the current line D Deletes to the end of the line yy Copies a line to the clipboard buffer p Pastes whatever is in the clipboard buffer below the current cursor P Pastes whatever is in the clipboard buffer above the current cursor 118 CIS 90 Lesson 11 E Fi 11 ru VI Miscellaneous Useful Commands Use in COMMAND mode g Tells you the filename you are editing and what lin
52. ve some fun when it stops raining All the counselors hate the waiters and the lake has alligators You remember Leonard Skinner He got ptomaine poisoning last night after dinner All the counselors hate the waiters and the lake has alligators You remember Leonard Skinner He got ptomaine poisoning last night after dinner Now I don t want this to scare you but my bunk mate has malaria You remember Jeffrey Hardy Their about to organize a searching party Now I don t want this to scare you but my bunk mate has malaria You remember Jeffrey Hardy Their about to organize a searching party Take me home oh Mother Father take me home I hate Granada jDon t leave me out in the forest where I might get eaten by a bear Take me home I promise that I won t make noise or mess the house with other boys oh please don t make me Nstay I ve been here one whole day jTake me home oh Mother Father take me home I hate Granada Don t leave me out in the forest where I might get eaten by a bear Take me home I promise that I won t make noise or mess the house with other boys oh please don t make me stay I ve been here one whole day Dearest Father darling Mother how s my precious little brother I will come home if you miss me I will even let Aunt Bertha hug and kiss me Dearest Father darling Mother how s my precious little brother I will come home if you miss me I will even let Aunt Bertha hug and kiss me
53. wd simben90 x 1047 190 Benji Simms home cis90 simben bin bash etc passwd simben90 x 1047 190 Benji Simms home cis90 simben bin bash etc passwd OLD simben90 x 1001 190 Benji Simms home cis90 simben bin bash Igrep etc pki dovecot private dovecot pem Permission denied grep etc pki dovecot certs dovecot pem Permission denied Jgrep etc pki CA private Permission denied grep etc pki rsyslog Permission denied grep etc pki tls private localhost key Permission denied grep etc pki tls certs localhost crt Permission denied grep etc polkit 1 localauthority Permission denied home cis90 simben s fj Use color with the color option 44 Shell SIX steps REVIEW CIS 90 Virtual Classroom Kk 11 dei est 1959 Example Command home cis90 simben find name egg 2 dev null home cis90 vasjor 1968 egg home cis90 cis 1968 egg home cis90 hictre 1968 egg home cis90 rodduk basket 1968 home cis90 lemrob 1968 egg home cis90 fahmic basket 1968 home cis90 casric 1968 egg home cis90 calmic 1968 egg home cis90 mosmic 1968 egg home cis90 mccpat 1968 egg home cis90 matjon basket 1968 home cis90 tilbuz basket 1968 home cis90 daweli 1968 egg snipped home cis90 rudtro 1968 egg home cis90 keljos basket 1968 home cis90 thinic 1968 egg home cis90 casenr 1968 egg home cis90 fitcon 1968 egg home cis90 simben 1968 egg home cis90 vivrut 1968 egg home cis90 specod 1968 egg h
54. y e What command that would redirect the line of output for the command using the least amount of memory to the file smallshell Iype the command you used and its output into the chat window CIS 90 Lesson 11 grep usage search inside files How many CIS 90 user accounts are there home cis90 simben grep cis90 etc passwd wc 1 ZA There are 29 38 CIS 90 Lesson 11 KW R pu grep practice e How many CIS 172 accounts are there on Opus Type the number of CIS 172 accounts into the chat window CIS 90 Lesson 11 l R 11 ii grep usage search inside files Example What is my account information in etc passwd home cis90 simben grep LOGNAME etc passwd simben90 x 1000 90 Benji Simms home cis90 simben bin bash Or home cis90 simben grep simben90 etc passwd simben90 x 1000 90 Benji Simms home cis90 simben bin bash OF home cis90 simben cat etc passwd grep LOGNAME simben90 x 1000 90 Benji Simms home cis90 simben bin bash comme a Comment Home directory Shell Group ID GID Note the field separator used User ID UID in etc passwd is a A0 password just a placeholder now CIS 90 Lesson 11 grep practice Does your user ID in etc passwd match the uid output by the id command Type your answer yes or no and your uid from the id command into the chat window EI 4 CIS 90 Lesson 1 Le 2 BG grep usage search inside fi

Download Pdf Manuals

image

Related Search

Related Contents

Scheda tecnica  CC100GV3 TURBO  Guide d`installation O3T  Learning Resources LRM2981 User's Manual  PTC 320 取扱説明書  ALPHA WASH 1500 LT C61315  Bosch KDN46AW30N fridge-freezer  

Copyright © All rights reserved.
Failed to retrieve file