*** shmohamud has quit (Ping timeout: 480 seconds) | 00:11 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 00:40 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 03:04 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 04:50 | |
jelkner | Good morning fkoikoi, scooper, and tboimah! | 10:38 |
---|---|---|
scooper | Good morning Jeff | 10:38 |
tboimah | Good morning Jeff | 10:38 |
fkoikoi | Good morning Jeff | 10:38 |
jelkner | I took the bus to work *early* this morning, so I am in my classroom now. | 10:39 |
jelkner | I've been working on learning to do responsive design. | 10:39 |
scooper | wow good using media query | 10:40 |
jelkner | and a bit of javascript | 10:40 |
jelkner | i found out that firefox has a "responsive design mode" | 10:41 |
jelkner | that makes testing easy | 10:41 |
scooper | I have a wonderful css book can I share it with you??? | 10:41 |
jelkner | easier, at least ;-) | 10:41 |
jelkner | absolutely1 | 10:41 |
jelkner | ! | 10:41 |
jelkner | please do | 10:41 |
jelkner | anyway, the ict.gctaa.net homepage is now responsive | 10:42 |
jelkner | and so is https://ict.gctaa.net/sections/csc221/ | 10:44 |
jelkner | i have to work on the rest of my classes today | 10:45 |
scooper | it's nice Jeff but when display on mobile only Courses information and Resource show on mobile | 10:47 |
jelkner | are you looking at the first one? | 10:47 |
scooper | yes | 10:48 |
jelkner | if you click the "hamburger" button, it toggles back and forth between the list of courses and the info section | 10:48 |
jelkner | I've tried it on a few phones, and it seems to work | 10:49 |
scooper | yes the hamburger menu is working? | 10:49 |
jelkner | it uses JavaScript | 10:50 |
jelkner | but it works for me | 10:50 |
scooper | what is the max-width you use in @media?? | 10:50 |
jelkner | look at the source code, my dear friend! | 10:50 |
jelkner | you don't need to ask me, you can ask the code! :-) | 10:51 |
jelkner | That's what you need to learn to do. | 10:51 |
jelkner | Anyway, i tested it on both Ubuntu Touch and LineageOS | 10:52 |
jelkner | and it works | 10:52 |
scooper | I m seeing 1080 | 10:52 |
jelkner | that's it! | 10:52 |
jelkner | i don't have a lot of experience with this | 10:53 |
jelkner | but i have a large group of students coming | 10:53 |
jelkner | they will be my testers | 10:53 |
jelkner | since if it works for them, it works | 10:53 |
jelkner | they are my audience | 10:53 |
jelkner | i choose 1080 and portrait | 10:53 |
jelkner | since modern phones like the Poco X3 NFC have that kind of resolution | 10:54 |
scooper | Jeff | 10:54 |
scooper | you can still you the browser to serve as phone | 10:55 |
jelkner | I'm not sure what you mean | 10:57 |
jelkner | if you are talking about "responsive mode", that's what i was saying | 10:57 |
jelkner | On Firefox, Hamburger -> More Tools -> Responsive Design Mode | 10:58 |
jelkner | give you a "mobile view" of the website | 10:58 |
svaye | Good morning Jeff | 10:59 |
sysadmin_ | You can still use the browser to serve as phone.. right click on inspect, at the far right corner search for a phone icon. when you click on that phone icon you will see responsive design mode... | 11:00 |
jelkner | nice | 11:01 |
jelkner | thanks! | 11:01 |
jelkner | ok, it's 7 am | 11:01 |
jelkner | 11 am your time | 11:02 |
jelkner | and i have *a lot* to do today | 11:02 |
jelkner | so let's get to it | 11:02 |
jelkner | scooper, adrian is asking about the linode | 11:02 |
jelkner | we need to shut down the MCSS mail server | 11:02 |
jelkner | and move it to your control | 11:02 |
jelkner | so please get that taken care of by Thursday | 11:02 |
*** fkoikoi has quit (Ping timeout: 480 seconds) | 11:03 | |
*** tboimah has quit (Ping timeout: 480 seconds) | 11:03 | |
jelkner | that's when i'll be meeting with adrian before he goes back to the UK | 11:03 |
*** scooper has quit (Ping timeout: 480 seconds) | 11:03 | |
sysadmin_ | We talk last week and then yesterday he send me email again | 11:03 |
sysadmin_ | but the such is not in Monrovia yet that while.... I haven't purchase the linode server | 11:04 |
sysadmin_ | as I speak the right server bill is still being deducted from my card......... | 11:04 |
jelkner | we could just shut mail down | 11:05 |
jelkner | and wait for the Supe to "feel the pain" | 11:05 |
jelkner | of not having it | 11:05 |
jelkner | then maybe he will act | 11:05 |
jelkner | if ya'll don't need it | 11:05 |
jelkner | we should just shut it down anyway | 11:06 |
scooper | It's import right now to mcss Jeff | 11:06 |
jelkner | then you need to act, my friend! | 11:06 |
scooper | we use it for major transaction | 11:06 |
jelkner | it is bad practice for MCSS to have mission critical infrastructure that it can not reliably control | 11:07 |
jelkner | when does the Supe get back? | 11:07 |
scooper | Ok but I also told Adrian to send the sup a mail and attach some urgency to it | 11:07 |
jelkner | that's not Adrian's job | 11:08 |
jelkner | it is yours and mine | 11:08 |
jelkner | Adrian is the developer | 11:08 |
jelkner | customer management belongs to us, my friend | 11:08 |
jelkner | we can't run a successful business if we ask the developers to be responsible for customer relations | 11:09 |
jelkner | that's what has been killing NOVA Web Development | 11:09 |
jelkner | we don't reliably invoice!!!!! | 11:09 |
jelkner | so we don't collect revenue | 11:09 |
jelkner | and we fail as a business | 11:09 |
jelkner | I met a young person in my Summer class how told me she is interested in business | 11:10 |
jelkner | her name is Kei, and you will be meeting her | 11:10 |
jelkner | she is going to try to take over as business manager for NOVA Web Development | 11:10 |
jelkner | that's what we have needed for so long | 11:10 |
jelkner | since none of the developers were effective at doing that | 11:11 |
jelkner | they didn't invoice | 11:11 |
jelkner | they didn't market | 11:11 |
jelkner | they didn't sell | 11:11 |
jelkner | they *did* do amazing developer work | 11:11 |
jelkner | they are the product | 11:11 |
jelkner | but if we don't have a business team | 11:12 |
jelkner | we fail | 11:12 |
jelkner | so no, it is not adrian's job to email the supe | 11:12 |
jelkner | it is yours and mine | 11:12 |
jelkner | i will just send an email like i did before | 11:12 |
jelkner | because i did this before | 11:13 |
jelkner | but this time, i'll be more "hard assed" about it | 11:13 |
scooper | ok Jeff can you add your voice to mine voice to get this done??? | 11:13 |
jelkner | i will state that "on such and such a date, the MCSS mail server hosted by NOVA Web Development will be turned off" | 11:13 |
jelkner | and if you do not take action before that date, you will not have working mail | 11:14 |
scooper | Got you | 11:14 |
jelkner | i have two other agenda items for today: | 11:15 |
jelkner | 1. discuss which Jetro Websters should join our Zulip chat | 11:15 |
jelkner | 2. follow up on our email from Saturday | 11:15 |
jelkner | I think that fkoikoi_ and scooper should be the first two people on Zulip | 11:16 |
jelkner | and svaye if she wants to | 11:16 |
jelkner | NOVA Web uses Zulip for most of our asychronous communication | 11:16 |
jelkner | and as we move forward in our collaboration, and begin to work together more closely on projects like the Rural Clean Cooking stove | 11:17 |
jelkner | the Jetro Web folks working on these projects will need to use Zulip | 11:17 |
jelkner | i see tboimah_ is here today | 11:17 |
jelkner | i still haven't heard anything from dcamune, janet, or jallah | 11:18 |
jelkner | it would be nice to know what their plans are | 11:18 |
jelkner | ACTION done | 11:18 |
scooper | Thanks for raising such concern as it relate to those names you mentioned | 11:18 |
jelkner | let's deal with Zulip first | 11:19 |
jelkner | svaye, are you here | 11:19 |
jelkner | ? | 11:19 |
svaye | +1 Jeff | 11:19 |
jelkner | are you in the lab? | 11:19 |
scooper | ok | 11:19 |
scooper | before we more | 11:19 |
scooper | secondly the book is exceeding it MB size for email, will it be ok for you if I send it through google drive??? | 11:20 |
svaye | Yes Jeff I am in the lab | 11:20 |
jelkner | scooper, let's not use Google drive | 11:20 |
mulbah | Good morning to all | 11:20 |
jelkner | you need to learn the skills we need | 11:20 |
jelkner | you can simply scp it to one of our servers | 11:20 |
jelkner | and tell me it's there | 11:20 |
scooper | ok | 11:20 |
scooper | I will do that now | 11:21 |
jelkner | great | 11:21 |
jelkner | svaye, what OS are you running on your laptop? | 11:21 |
svaye | ubuntu | 11:21 |
jelkner | sweet | 11:21 |
jelkner | https://zulip.com/help/desktop-app-install-guide | 11:22 |
jelkner | you can ask Mulbah for assistance | 11:22 |
jelkner | and i see that mulbah is here, great! | 11:22 |
jelkner | mulbah, how about you, can i invite you to our NOVA Web zulip chat? | 11:23 |
jelkner | Kevin uses it often | 11:23 |
jelkner | i tried to set up a Zulip for MCSS | 11:23 |
mulbah | okay | 11:23 |
jelkner | but only Gabriel and a few others ever used it | 11:23 |
mulbah | That will be great | 11:23 |
jelkner | better to just have one place where we meet | 11:23 |
jelkner | so communicaiton is easier | 11:23 |
jelkner | ACTION goes to send Zulip invites to mulbah and svaye | 11:24 |
jelkner | mulbah and svaye, you have both been invited | 11:28 |
jelkner | you will recieve an email at your NOVA Web email address with instructions | 11:29 |
jelkner | You need to install Zulip | 11:29 |
jelkner | mulbah, that's *your* responsibility as a sys admin! ;-) | 11:29 |
jelkner | ok, that's all i have for now | 11:30 |
fkoikoi_ | Jeff can I say something | 11:30 |
jelkner | please, fkoikoi_ | 11:30 |
jelkner | ACTION waits for fkoikoi_ to say something... | 11:32 |
fkoikoi_ | I apologize for not having items on the agenda for the past weeks. I know that I also have that responsibility as an assistant and I am sorry for being reluctant. I am going to call Janet, Jallah and decamue right after this meeting to hear from them too. | 11:32 |
jelkner | that's great, fkoikoi_ | 11:33 |
jelkner | we need for you to develop as a leader | 11:33 |
jelkner | it is a process | 11:33 |
jelkner | and will take time | 11:33 |
jelkner | i understand that | 11:33 |
jelkner | but our shared success depends on it | 11:34 |
jelkner | take charge, fkoikoi_! | 11:34 |
fkoikoi_ | Alright Jeff, thanks | 11:34 |
jelkner | this is *your* business we are building | 11:34 |
jelkner | that's what worker cooperatives are all about | 11:34 |
fkoikoi_ | sure | 11:34 |
dcammue | Good day everyone | 11:34 |
jelkner | i'll be back on at 7 am tomorrow | 11:34 |
jelkner | let's talk more then | 11:35 |
jelkner | svaye, mulbah please join the Zulip by then | 11:35 |
svaye | Okay Jeff | 11:35 |
mulbah | Alright Jeff | 11:35 |
jelkner | until tomorrow morning | 11:35 |
fkoikoi_ | Okay Jeff, Have a great day. | 11:35 |
jelkner | you too, fkoikoi_! | 11:35 |
jelkner | ACTION signs off for the day | 11:36 |
*** jelkner has quit (Quit: Leaving) | 11:36 | |
*** dcammue has quit (Ping timeout: 480 seconds) | 11:48 | |
*** fkoikoi_ has quit (Quit: Leaving) | 11:59 | |
*** svaye has quit (Quit: Leaving) | 12:16 | |
ubuntourist | Hullo mulbah and tboimah | 13:00 |
ubuntourist | (And Hullo scooper, too) | 13:01 |
ubuntourist | Hoping for a stable network connection today. | 13:01 |
tboimah | how are you doing Mr Cole | 13:01 |
tboimah | sure | 13:01 |
scooper | Good morning ubuntourist | 13:01 |
ubuntourist | I'm doing well. And how are you all doing? | 13:02 |
tboimah | Great | 13:02 |
ubuntourist | So, has anyone experimented with script and scriptreplay? They're both easy to use and are wonderful for recording and playing back terminal sessions. | 13:03 |
tboimah | I read the past conversation from the IRC log and i also saw you assignment | 13:03 |
ubuntourist | Any progress with the assignment? | 13:04 |
ubuntourist | ACTION waits for signs of life 😉 | 13:07 |
tboimah_ | yes | 13:08 |
ubuntourist | As we continue, we will need to start working more via e-mail, I think. The network is just TOO unstable. | 13:08 |
tboimah_ | should i share my screen with you so that i can do that | 13:09 |
ubuntourist | And, using script and scriptreplay, we can share recordings of all of our terminal work. | 13:09 |
ubuntourist | tboimah_, to show what you've done with the assignment? Yes, please. Share a terminal. | 13:10 |
ubuntourist | ACTION waits for a stable connection... | 13:12 |
sysadmin | ubuntourist the internet is good today but the power cord mistakenly slip that while | 13:12 |
*** tboimah has quit (Ping timeout: 480 seconds) | 13:12 | |
*** mulbah has quit (Ping timeout: 480 seconds) | 13:12 | |
*** scooper has quit (Ping timeout: 480 seconds) | 13:12 | |
tboimah | ssh vPQcCLdLHF4m7NVwvKBvEEsj6@lon1.tmate.io | 13:14 |
mulbah | Good morning Mr. Cole | 13:14 |
tboimah | you ssh into that link and see what i am doing | 13:14 |
ubuntourist | Hi mulbah | 13:14 |
ubuntourist | I'm on now tboimah | 13:14 |
tboimah | should i start | 13:15 |
ubuntourist | tboimah, yes | 13:15 |
ubuntourist | mulbah, can you see what tboimah is doing? | 13:15 |
mulbah | no I'm trying to ssh into the link | 13:16 |
ubuntourist | tboimah, stop for a moment. | 13:16 |
*** sysadmin_ has quit (Ping timeout: 480 seconds) | 13:17 | |
*** tboimah_ has quit (Ping timeout: 480 seconds) | 13:17 | |
*** mulbah07_ has quit (Ping timeout: 480 seconds) | 13:17 | |
tboimah | okay | 13:17 |
ubuntourist | Let's use script to record. | 13:17 |
tboimah | okay | 13:18 |
ubuntourist | script -T timecode | 13:18 |
ubuntourist | exit and then | 13:18 |
ubuntourist | exit first | 13:18 |
ubuntourist | Now script -T timecode | 13:18 |
ubuntourist | Now do the "ls" again and contine with your ccomments etc. | 13:19 |
ubuntourist | (I want to have a nice record that we can play back again later.) | 13:19 |
tboimah | ACTION done | 13:22 |
ubuntourist | tboimah, Bravo! | 13:22 |
tboimah | Thanks | 13:22 |
ubuntourist | So. On the screen now, there is information about where you should send e-mail for problems, and also a URL for | 13:23 |
ubuntourist | where to find out more about the package. | 13:23 |
ubuntourist | If I had a problem, I would contact the Maintainer. If I wanted to know more about the history and development | 13:24 |
ubuntourist | and maybe more documentation, I would look at the Homepage | 13:24 |
ubuntourist | We don't want to waste time with that right now. | 13:24 |
ubuntourist | Just know that whenever you want to find out more about a file, you can | 13:25 |
ubuntourist | go through the steps you just did: | 13:25 |
ubuntourist | 1. find out if the file exists with "ls" | 13:25 |
ubuntourist | 2. Find which package it belongs to with "dpkg-query -S" | 13:26 |
ubuntourist | 3. Find out what it does, who maintains it and were to get more info with "apt-cache show" | 13:26 |
ubuntourist | Let's play back yout work: Type "q" to quit. then type "exit" | 13:27 |
ubuntourist | Now we'll play it back: | 13:27 |
ubuntourist | scriptreplay -t timecode | 13:27 |
ubuntourist | (and then just sit and wait and watch.) | 13:27 |
tboimah | okay | 13:28 |
ubuntourist | It may take a few minutes. It is doing things at the speed you typed. And if you paused for a long time, it pauses. | 13:28 |
ubuntourist | (It will stay here for a minute, because we chatted while "most" was displaying the "apt-cache show". | 13:31 |
ubuntourist | so the screen is paused, because you were not typing. In a minute or two, the screen will scroll, and then, | 13:32 |
ubuntourist | eventually, the "q" and the "exit" will show up.) | 13:32 |
tboimah | sure | 13:33 |
ubuntourist | Ans when the "exit" is shown, the screen will also indicate that the script is finished playing back. | 13:33 |
ubuntourist | So you know how to use "scp" to copy files both directions between your computer and the server? | 13:34 |
tboimah | yes | 13:34 |
tboimah | we can do that in the lab here | 13:34 |
ubuntourist | Good. When it finishes the "movie" you can copy the two files "typescript" and "timecode" from the server to your computer. | 13:35 |
tboimah | okay | 13:36 |
ubuntourist | Then you can run the playback on your computer (with "scriptreplay -t timecode") or you can send the two files as an | 13:36 |
tboimah | should i do that now | 13:36 |
ubuntourist | attachment to me, or Jeff or whomever you want, and they can replay yout work on their computers. | 13:37 |
ubuntourist | Sure. Let's do that. | 13:37 |
ubuntourist | So exit the server and scp the files from the server to your computer. | 13:37 |
ubuntourist | Yep. | 13:38 |
ubuntourist | Now, because we made that abbriviation for the server name you can use that | 13:38 |
ubuntourist | (I think you used mcss for the abbrviation.) | 13:38 |
tboimah | I am using one of the machine in the lab not my personal computer | 13:39 |
ubuntourist | so "scp mcss:timecode ." and "scp mcss:typescript ." should do the trick. | 13:39 |
ubuntourist | (Don't forget the period at the end, which means "this directory location") | 13:40 |
ubuntourist | You don't need all that. | 13:40 |
ubuntourist | That's why we set up the abbreviations. | 13:41 |
tboimah | i know but i am not using my personal computer i am using one of the computer in the lab | 13:41 |
ubuntourist | We made a shortcut (or alias) for "tboi.....org"... | 13:41 |
ubuntourist | Ah, | 13:42 |
tboimah | sure | 13:42 |
ubuntourist | Then, if you haven't copied over the config, then my mistake: You'll need the long form of the command. Sorry. | 13:42 |
ubuntourist | Try typing a tab here | 13:43 |
ubuntourist | Never mind. (That still depends on the "config" file. Ignore that suggestion.) | 13:44 |
ubuntourist | space period. | 13:44 |
ubuntourist | enter | 13:44 |
tboimah | done | 13:45 |
ubuntourist | up-arrow, and get the "typescript" file too. | 13:45 |
ubuntourist | You need both. | 13:45 |
tboimah | done | 13:46 |
ubuntourist | The "rypescript" file has all of your keystrokes and output, but it's "ugly" | 13:46 |
ubuntourist | try "most typescript" to see what I mean. | 13:46 |
ubuntourist | See the stuff at the top? | 13:47 |
tboimah | it look ugly | 13:47 |
tboimah | and confusing | 13:48 |
ubuntourist | That ^[[2004h is a called an "ANSI escape sequence" | 13:48 |
ubuntourist | ANSI = American National Standards Institute -- I think. I forget exactly what it stands for.. | 13:49 |
ubuntourist | an "escape sequence" is a series of characters that are interpreted rather than displayed normally. | 13:49 |
ubuntourist | The "^[" is actually the "esc" or "ESCAPE" key's representation. | 13:50 |
ubuntourist | ANSI escape sequences are used to clear the screen, change colors, and show the cursor position. | 13:50 |
tboimah | okay | 13:51 |
ubuntourist | The problem is that "most" (and "less" and other programs) don't know how to interpret the escape sequences in a file. | 13:51 |
ubuntourist | But "scriptreplay" knows what to do. However, scriptreplay needs a companion file to tell it when to display and wen to pause. | 13:52 |
ubuntourist | If you scroll down to where you typed "dpkg-query -S ... | most" it will get REALLY ugly. | 13:52 |
ubuntourist | The stuff in red is where you typed backspaces. | 13:53 |
ubuntourist | Anyway, q to quit. | 13:54 |
ubuntourist | now "most timecode" | 13:54 |
tboimah | done | 13:55 |
ubuntourist | That is telling it how to time the typing. When should it pause? when should it continue? when did you type fast? when did you type slowly? | 13:55 |
ubuntourist | All of that information is in the "timecode" file. So, together with "typescript" the scriptreplay figures out how to show the "movie". | 13:56 |
ubuntourist | So, when you are sharing examples with other people who are learning, or sending assignments to Jeff or me, or trying to show | 13:56 |
ubuntourist | someone a problem that you are having, send BOTH files. | 13:57 |
tboimah | okay | 13:57 |
ubuntourist | Without the timecode file, it means someone will have to fight through the mess of ANSI escape sequences. | 13:57 |
ubuntourist | Also there's nothing special about the name "timecode". | 13:58 |
ubuntourist | when you typed "script -T timecode" you said "I want a timing file (-T) and I want it to be named 'timecode'." | 13:59 |
ubuntourist | You could say "script -T August_7_2023" and then for the playback "scriptreplay -t August_7_2203" | 14:00 |
tboimah | okay | 14:01 |
ubuntourist | I like "timecode" or "timecodes" because that's the term used in audio and video production for synchronizing the two. | 14:01 |
tboimah | it is cool to work with | 14:02 |
ubuntourist | (Also there is a way to tell script not to use the filename "typescript" but I forget the option to do that. I just let script choose | 14:02 |
ubuntourist | its preferred default filename "typescript".) | 14:02 |
tboimah | okay | 14:03 |
ubuntourist | Each time you use "script" it will OVERWRITE the old "typescript" and "timecode" file. So, if you want to save many | 14:03 |
ubuntourist | you must remember to rename the old files or move them to a separate directory, before starting script again. | 14:04 |
ubuntourist | q to quit | 14:04 |
ubuntourist | Here's a handy way that I create subdirectories. This goes back to the book, talking about expansions. | 14:05 |
ubuntourist | You can expand commands. Type: | 14:05 |
ubuntourist | date --iso | 14:05 |
tboimah | done | 14:05 |
ubuntourist | That prints the current date, in the International Standards Organization (ISO) preferred format. | 14:06 |
ubuntourist | Now, type: | 14:06 |
ubuntourist | mkdir $(date --iso) | 14:06 |
ubuntourist | ls | 14:06 |
ubuntourist | See the first line? | 14:06 |
ubuntourist | can you guess what happened? | 14:07 |
tboimah | it make a directory of the current date | 14:07 |
tboimah | it give the directory the name of the current date | 14:08 |
ubuntourist | Yes. The $(...) says "put the output of the command between the parenthesis into the line". | 14:08 |
ubuntourist | The Bash shell looks at what is in the parenthesis, and evaluates it, If it is a command, it substitutes the results of the command. | 14:09 |
ubuntourist | So "mkdir $(...)" becomes "mkdir [the output of the command]" | 14:10 |
ubuntourist | We will be using $(...)" a LOT. It is super-powerful. | 14:10 |
tboimah | wow | 14:11 |
ubuntourist | Let's try a more complicated example. | 14:11 |
ubuntourist | You've used the find command, right? | 14:11 |
tboimah | ni | 14:12 |
tboimah | no | 14:12 |
ubuntourist | Ah. Let's start there, instead. | 14:12 |
ubuntourist | "find" is for finding files on your computer. It needs a "starting directory" and instructions on what to search for.. | 14:13 |
ubuntourist | The "starting directory" means that it will only search that directory and subdirectories inside that directory. | 14:13 |
ubuntourist | So, if you wanted to search your entire computer, you would use "/" as the starting directory. If you only wanted to search | 14:14 |
ubuntourist | your own directories, you would start with your home directory "~/" (or "/home/tboimah/") | 14:15 |
ubuntourist | If you wanted to search only your Downloads, "~/Downloads". | 14:16 |
ubuntourist | You can search for files that match a certain name. Or search for only directory names, or search for files created before or after a certain date... | 14:17 |
ubuntourist | or files with certain access permission or ownership, or lots of other criteria. But the most common use I have is | 14:17 |
ubuntourist | searching for files that match a filename pattern. | 14:17 |
ubuntourist | so, type: | 14:18 |
ubuntourist | find ~/ -name "*.conf" | 14:18 |
tboimah | done | 14:18 |
ubuntourist | Understand what it did? | 14:19 |
tboimah | it find all the config file that end with end standtion .conf | 14:20 |
ubuntourist | Extension not standtion. But yes. That's correct. | 14:20 |
tboimah | okay thanks for the correction | 14:21 |
ubuntourist | Programming languages have a concept: When you have a list of items -- numbers, filenames, vocabulary words... anything -- | 14:21 |
ubuntourist | you often want to do the same operation on every item in the list. Maybe you want to view the item if it's a file. Or add the number 5 to each item if the list is a list of numbers. | 14:23 |
ubuntourist | Here, the "find" command returned a list of file names. | 14:23 |
ubuntourist | Suppse, instead of typing "most /home/sysadmin/.config/hexchat/notify.conf" and then | 14:24 |
ubuntourist | "most /home/sysadmin/.config/hexchat/ignore.conf" and then | 14:24 |
ubuntourist | "most /home/sysadmin/.config/hexchat/sound.conf" and so on, | 14:24 |
ubuntourist | we can make the Bash shell do the work for us? | 14:24 |
tboimah | okay | 14:26 |
ubuntourist | We can, with a "for" loop. A "for" loop means, "for everything in a list, repeat (or "loop") through the following commands, substituting the next element in the list. | 14:26 |
ubuntourist | Lets start up script again. But first, we'll rename the old files before we start. | 14:28 |
tboimah | we are going to python now | 14:28 |
tboimah | okay | 14:28 |
ubuntourist | mv typescript typescript-2023-08-07-13-00 | 14:28 |
*** mulbah has quit (Remote host closed the connection) | 14:29 | |
ubuntourist | mv timecode timecode-2023-08-07-13-00 | 14:29 |
tboimah | done | 14:30 |
ubuntourist | (I'm just using the date and the time when we started.) | 14:30 |
tboimah | done | 14:32 |
*** mulbah has quit (Remote host closed the connection) | 14:32 | |
ubuntourist | OK. Now "script -T timecode" | 14:32 |
tboimah | done | 14:32 |
ubuntourist | Lets do the find again so that it is in the script. Up-arrow WON'T work here. It will not remember the find command. | 14:33 |
ubuntourist | It only remembers what was typed while you were "inside" of a script. We'll talk about that more in the future. | 14:34 |
ubuntourist | (enter) | 14:34 |
ubuntourist | Now, we're going to use that list, and feed it to most, one file at a time. This will be four lines of typing. So, wait til I type four lines.... | 14:35 |
ubuntourist | for item in $(find ~/ -name "*.conf") | 14:36 |
ubuntourist | do | 14:36 |
ubuntourist | most $item | 14:36 |
ubuntourist | done | 14:36 |
ubuntourist | (Before you type those, can you speculate about what it might do?) | 14:37 |
tboimah | okay for the first command | 14:38 |
tboimah | it is saying the find all the file that is in the home directory that end with the extension .conf | 14:39 |
*** mulbah07_ has quit (Read error: Connection reset by peer) | 14:40 | |
tboimah | for the second command it say that list the content item | 14:40 |
tboimah | ACTION done | 14:40 |
ubuntourist | The $(find...) will create a list. The "for item in" says for every item in a list that follows... | 14:41 |
ubuntourist | and then the "do" and "done" surround the commands that you want to use with each item. | 14:42 |
ubuntourist | Let's start a little simpler: | 14:42 |
ubuntourist | Type the following four lines, including the "done" at the end: | 14:43 |
ubuntourist | for x in mon tues wed thurs fri | 14:43 |
ubuntourist | do | 14:43 |
ubuntourist | echo "today is " $x | 14:43 |
ubuntourist | done | 14:43 |
*** mulbah07_ has quit (Remote host closed the connection) | 14:45 | |
ubuntourist | Good. | 14:45 |
tboimah | done | 14:45 |
*** thehedgeh0g has left #novawebdev (None) | 14:46 | |
ubuntourist | We've played a little but with "environment variables" a few weeks ago. | 14:46 |
mulbah07_ | sure | 14:46 |
ubuntourist | The word that follows "for" is a variable that you can use later with a $ prefix. So in the above examples, "item" was a variable, and "x" was a variable. | 14:47 |
ubuntourist | in the second example, we created a list: "mon tues wed thurs fri" | 14:47 |
ubuntourist | Then, using "for" we said "pick an item from the list, one at a time" | 14:48 |
ubuntourist | the "x" means "assign the value of the item we selected to a variable named 'x'" | 14:48 |
ubuntourist | Then, in what is called the "body of the loop" -- the part between "do" and "done" -- we said "echo", | 14:49 |
ubuntourist | which means "type back whatever I tell you to type" | 14:50 |
ubuntourist | The part in quotes should be typed exactly as written. So, "today is". | 14:50 |
ubuntourist | But the $x is a variable. Just like the environment variables. Each time the "for" gets a new value, $x changes. | 14:51 |
ubuntourist | So echo "today is" $x changes. each time, it "echoes back" with a new value. | 14:51 |
ubuntourist | OK? | 14:52 |
tboimah | okay | 14:52 |
tboimah | okay it is well understood | 14:53 |
ubuntourist | Now we're going to try that more complicated one, and that will finish the day. I'll type it again below. | 14:53 |
ubuntourist | for i tem in $(find ~/ -name "*.conf") | 14:53 |
ubuntourist | do | 14:53 |
ubuntourist | most $item | 14:53 |
ubuntourist | done | 14:53 |
tboimah | done | 14:54 |
*** mulbah has quit (Ping timeout: 480 seconds) | 14:55 | |
ubuntourist | Ok, it looks like the first file is empty. We can see the filename in blue at the bottom of the screen and it | 14:55 |
ubuntourist | tells us we are 100% through the file. | 14:55 |
ubuntourist | Type "q" | 14:55 |
ubuntourist | Excellent. | 14:56 |
ubuntourist | It showed us ALL of the ".conf" files, one at a time. | 14:56 |
ubuntourist | Type "exit" to save the typescript and timecode file | 14:57 |
tboimah | done | 14:57 |
tboimah | ubuntourist before you leave can i ask you a question | 14:57 |
ubuntourist | We had a lot of long pauses. So the scriptreplay will be S-L-O-O-O-W! | 14:57 |
ubuntourist | Yes. Please. | 14:58 |
*** mulbah07_ has quit (Read error: Connection reset by peer) | 14:58 | |
tboimah | If i am a system admin and my os is given problem and i want to run a new os how will i get all my information form the old os on ubuntu | 14:59 |
ubuntourist | That's a HUGE questiion! A good one, but a very big topic. | 15:00 |
ubuntourist | A simple answer, that is NOT complete: | 15:01 |
tboimah | Ah okay | 15:01 |
ubuntourist | First you will want to copy all of the "/home" directories: This will save the work of all of your users. As a systtems administrator, | 15:02 |
ubuntourist | you can get packages working again, and reinstall stuff, but there is no way to know what your users have been working on. | 15:02 |
ubuntourist | So, you want to preserve students work, your business manager's records of finances, the letter to the organization that you are asking to help you, etc. | 15:03 |
ubuntourist | All of that is going to be impossible to recover if you trash your system. | 15:04 |
tboimah | okay thanks | 15:04 |
ubuntourist | Next, save alll the files and directories in /etc. Those are specific configurations for your system. A lot of the configurations will be similar | 15:04 |
ubuntourist | across all your computers. But, the list of users will be different on each computer, and the name of the computer -- for example, I see you are on "tubman" -- | 15:05 |
tboimah | yes | 15:06 |
ubuntourist | will be different for each machine. That kind of configuration data is saved in one of the many, many configuration files in /etc. | 15:06 |
ubuntourist | Next, you'll want a list of packages that are installed. The basic packages will be the same on your systems, but, for example, | 15:07 |
ubuntourist | "most" is not a standard package, and had to be specially installed with "apt install most". | 15:07 |
ubuntourist | You will want to be able to get the full list of ALL installed packages, so that when you are setting up a machine from scratch, | 15:07 |
ubuntourist | you can run all the "apt installs". Then look at the saved /etc files to see which ones you need. (You'll need the file /etc/passswd and /etc/shadow, for example, | 15:08 |
*** mulbah07_ has quit (Read error: Connection reset by peer) | 15:08 | |
ubuntourist | because they will contain your list of users and their passwords. You want to avoid resetting everyone's login password.) | 15:09 |
ubuntourist | And finally, you'll want to restore all the saved /home directories so that your people can continue working from where they | 15:10 |
ubuntourist | stopped before your computer disaster.. | 15:10 |
*** mulbah07_ has quit (Remote host closed the connection) | 15:10 | |
ubuntourist | But there is a LOT more to learn before you even THNK about trying something that big! | 15:10 |
tboimah | okay is there any assignment for today | 15:11 |
ubuntourist | No. I think we did a lot today. I guess you should experiment with script and scriptreplay -- but remember to rename the two filles to save any work you want to watch again later. Also, maybe experiment with the for loops... | 15:12 |
*** mulbah has quit (Ping timeout: 480 seconds) | 15:12 | |
tboimah | okay thanks for today | 15:13 |
ubuntourist | Try to become comfortable with the tools so that you don't have to think too much about how and when you might want to use them. | 15:13 |
ubuntourist | And, of course, typing practice is always a good thing. | 15:13 |
ubuntourist | That's it. See you Friday! | 15:14 |
ubuntourist | Oh, and share the typescript files and timecode files with mulbah. | 15:14 |
tboimah | okay | 15:14 |
tboimah | i will do that | 15:14 |
tboimah | have a nice day | 15:15 |
ubuntourist | (You should have four files. The first typescript and timecode files that we renamed, and the two that we just saved.) | 15:15 |
ubuntourist | Bye! | 15:16 |
tboimah | okay | 15:16 |
*** ubuntourist has quit (Quit: Leaving) | 15:16 | |
*** fkoikoi has quit (Quit: Leaving) | 15:25 | |
*** tboimah has quit (Quit: Leaving) | 16:06 | |
*** scooper has quit (Quit: Leaving) | 16:08 | |
*** mulbah has quit (Ping timeout: 480 seconds) | 16:17 | |
*** janet has quit (Ping timeout: 480 seconds) | 16:17 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 19:51 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 21:45 | |
*** shmohamu_ has quit (Ping timeout: 480 seconds) | 21:51 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 22:18 | |
*** shmohamud has quit (Remote host closed the connection) | 23:36 | |
*** shmohamud has quit (Remote host closed the connection) | 23:48 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!