*** jelkner has quit (Ping timeout: 480 seconds) | 01:14 | |
*** ledmer_ has quit (Quit: Leaving) | 01:32 | |
*** ledmer has quit (Read error: Connection reset by peer) | 04:08 | |
*** jelkner has quit (Ping timeout: 480 seconds) | 05:35 | |
*** jelkner has quit (Ping timeout: 480 seconds) | 10:08 | |
*** jelkner has quit (Ping timeout: 480 seconds) | 10:43 | |
*** jelkner has quit (Ping timeout: 480 seconds) | 11:16 | |
*** tboimah has quit (Ping timeout: 480 seconds) | 11:23 | |
*** svaye has quit (Quit: Leaving) | 11:30 | |
mulbah | Hello tboimah | 12:23 |
---|---|---|
tboimah | How are you doing mulbah? | 12:23 |
mulbah | trying oo bro yesterday wasn't easy the malaria was really giving me hard time | 12:25 |
tboimah | I am so sorry for that bro, I wish you speedy recovery | 12:25 |
mulbah | but at less I am little bit okay now | 12:26 |
mulbah | Thanks bro for the concern | 12:26 |
tboimah | That is Good to hear | 12:26 |
*** tboimah has quit (Remote host closed the connection) | 12:31 | |
tboimah | Good morning Mr. Cole | 13:01 |
ubuntourist | Hi tboimah and mulbah | 13:01 |
ubuntourist | I | 13:01 |
mulbah | Hi Mr. Cole | 13:02 |
ubuntourist | I'm "cooling down" from morning exercise. (I used to travel back and forth to work via bicycle, but now that I am no longer employed, I've become lazy and it is making me fat. So, I am trying to force myself to exercise. I still hatte it. I have to get back to finding places to bicycle to regularly.) | 13:03 |
ubuntourist | So, how are you both doing? | 13:03 |
tboimah | For me I am Good | 13:04 |
mulbah | I am not feeling too well | 13:04 |
mulbah | for the pass four days now malaria have been giving me hard time | 13:05 |
mulbah | but I'm trying small small | 13:05 |
ubuntourist | mulbah, sorry to hear that. According to Jeff that is a very regular problem in the area, and access to good medicine is very limited. | 13:06 |
ubuntourist | Any questions or thoughts before we continue diving deep into the Bash shell? | 13:07 |
tboimah | For me no | 13:07 |
tboimah | the only place i got stuck this gone time is when we start the screen sharing, because of the connection | 13:09 |
ubuntourist | OK. tboimah I got your e-mail summary. | 13:09 |
mulbah | I have no question because I haven't been reading this week because of the sickness | 13:09 |
ubuntourist | I'm re-reading it now because there was something I wanted to clarify, but I forgot what it was... Hold for a second. | 13:09 |
tboimah | ACTION waiting for ubuntourist | 13:10 |
ubuntourist | mulbah, if you feel confident that you've understood what is in the IRC chat, that will be good enough. | 13:11 |
ubuntourist | I need to go back to the book and see what topics I want to cover there. | 13:11 |
ubuntourist | We will be getting back to that movie with the "for" loop eventually. | 13:11 |
ubuntourist | tboimah, I just re-read your message. And it is a good summary. I guess the thing I was concerned about was | 13:13 |
ubuntourist | the history that you missed in the terminal session. | 13:13 |
tboimah | yeah | 13:13 |
ubuntourist | Since we did that on the server, and used my account, I should have a good history file. | 13:14 |
ubuntourist | I'm looking at my history now, and checking for important details... | 13:15 |
ubuntourist | I will send the history to you both via e-mail, and re-explain a few things. | 13:17 |
tboimah | Okay, thanks | 13:17 |
mulbah | Alright | 13:17 |
ubuntourist | One thing I wanted to talk about was "diff" diff is a tool that compares two files and shows the differences between them. | 13:18 |
ubuntourist | This becomes useful for tasks like comparing a user's .profile to the standard basic profile. | 13:19 |
ubuntourist | If the user edits and customizes their personal file, it will be different from the starter .profile in /etc/skel/ | 13:20 |
ubuntourist | Suppose the user did something that breaks their setup. Their .profile (or .bashrc) started out as identical to the /etc/skel/ | 13:21 |
ubuntourist | version. So, if you can see which parts are "good" (the parts that have not been changed) and which parts | 13:22 |
ubuntourist | MIGHT be bad (the parts your user added), you have an easier time looking at the two files. | 13:23 |
ubuntourist | Hold a sec again. I need to set up a good example. (I should have ddone it sooner but it won't take long.) | 13:24 |
tboimah | ACTION waiting on ubuntourist | 13:25 |
ubuntourist | Sorry, that took longer than I thought. | 13:29 |
ubuntourist | tmate time... | 13:29 |
ubuntourist | ssh eL6UGaPGebtaQa83EmMWE8HJx@lon1.tmate.io | 13:30 |
mulbah | should we tmate | 13:31 |
ubuntourist | mulbah, yes | 13:31 |
ubuntourist | mulbah, I pasted in the chat above. | 13:31 |
ubuntourist | I will explain here what is showing in the terminal. | 13:33 |
tboimah | okay | 13:33 |
ubuntourist | diff /etc/skel/.profile .profile | 13:33 |
ubuntourist | For preciseness, I probably should have made the second file ~/.profile. I'll do that now. | 13:34 |
ubuntourist | If you are going to adjust the screen size, let me know. It messes up the demonstration if the text keeps changing. | 13:34 |
mulbah | okay Mr. Cole | 13:35 |
ubuntourist | To compensate for the smaller screen size I have added "most" to the command. So what I typed is: | 13:36 |
ubuntourist | diff /etc/skel/.profile ~/.profile | most | 13:36 |
ubuntourist | The first two lines that you see on the screen tell you which two files are being compared. | 13:37 |
ubuntourist | Notice one line starts with "---" and the other with "+++" | 13:38 |
ubuntourist | This means that if the second file has lines ADDED to it that were not in the original, they will have a "+" sign at the beginning. | 13:39 |
ubuntourist | If the second file has lines REMOVED from the original, they will show up with a "-" prefix. | 13:39 |
ubuntourist | And, newer versions of "diff" add even more help, by adding color. So added lines show up in GREEN and deleted lines | 13:40 |
ubuntourist | show up in RED. | 13:40 |
ubuntourist | If you CHANGE a line, diff interprets it as you DELETED a line and then ADDED a line. | 13:41 |
ubuntourist | Let me quickly do that. | 13:41 |
ubuntourist | There. I've made some small changes, and previously, I added lines. | 13:43 |
ubuntourist | The first line of the file is in WHITE. That means the line has not changed. Both /etc/skel/.profile and ~/profile start with: | 13:44 |
ubuntourist | # ~/.profile: executed by the command interpreter for login shells. | 13:44 |
ubuntourist | Before I continue, the line in CYAN (a shade of BLUE) is a "location" line and starts with "@@". | 13:45 |
ubuntourist | To be honest, I forget how the location lines work. I will try to remember to check. But the idea is that it indicates | 13:47 |
ubuntourist | which lines in both files have been changed. | 13:47 |
mulbah | The -# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login │·······-# exists. │·······-# see /usr/share/doc/bash/examples/startup-files for examples. │·······-# the files are located in the bash-doc package. | 13:48 |
ubuntourist | It is telling us that we are looking at the first lines in both files (the "-1" and the +1" | 13:49 |
ubuntourist | It shows that I deleted four lines and then added nine lines. (the RED "-" lines and the GREEN "+" lines.) | 13:51 |
ubuntourist | Oh... Wait... I understand from looking what the @@ ... @@ lines mean: | 13:52 |
ubuntourist | Starting at the first white line, and going to the last white line, the original file started at line 1 and was 8 lines long. | 13:53 |
ubuntourist | The new file changes start at line 1 and is 13 lines long. | 13:54 |
ubuntourist | So, the newer file has five additional lines. | 13:54 |
ubuntourist | Near the bottom, we see @@ -25,3 +30,8 @@. | 13:55 |
ubuntourist | That means in the original file, starting at line 25, there were 3 lines in the "section" being compared. | 13:55 |
ubuntourist | in the new file, the matching text starts at line 30, but has 8 lines. So five lines were added. | 13:56 |
ubuntourist | Take a minute and see if you understand. | 13:56 |
ubuntourist | Let me know when you are ready to continue or if you have questions. | 13:57 |
ubuntourist | ACTION will wait to hear BOTH of you confirm you are ready before continuing. | 13:58 |
tboimah | ACTION done | 13:58 |
tboimah | ready to continuing | 13:59 |
ubuntourist | You can experiment on your own: Create a file with some text in it. Anything. It could be a short essay, or a Python program, or a poem. | 13:59 |
ubuntourist | Make a copy of it, and change some words in the copy. | 13:59 |
ubuntourist | then use the "diff" command to compare the two files. | 13:59 |
ubuntourist | ACTION waiting for mulbah to confirm understanding... | 14:00 |
tboimah | ACTION please excuse me use the bathroom | 14:00 |
mulbah | Yeah I'm getting the understanding | 14:01 |
mulbah | of it | 14:01 |
ubuntourist | OK. Good. | 14:01 |
ubuntourist | Eventually, if Jeff has not already shown it to you, we will do a little work with "git" | 14:01 |
ubuntourist | git uses "diff" a lot. | 14:02 |
ubuntourist | (I don't want to type too much today, since mulbah, you're not feeling well, and tboimah is temporarily away.) | 14:03 |
tboimah | ACTION back | 14:03 |
ubuntourist | Did either of you play with "git" when Jeff was teaching you? Probably not, but maybe he mentioned it. | 14:04 |
tboimah | yeah | 14:05 |
mulbah | yeah | 14:05 |
mulbah | with vs code terminal | 14:05 |
tboimah | i have use git before | 14:05 |
ubuntourist | So, git keeps a record of changes to files. It does this by using "diff" and saving the differences. | 14:06 |
tboimah | to push, merge, clone and etc project | 14:06 |
ubuntourist | For example, we recently looked at /etc/lvm/lvm.conf and found that it was over 2300 lines long with all the comments. | 14:06 |
ubuntourist | If you changed it 10 times, and every time you changed it you told "git", you do not want git to have ten | 14:07 |
ubuntourist | complete copies. That would be over 23000 lines! | 14:08 |
ubuntourist | You PROBABLY only made ten very minor changes where you changed one or two lines each time. | 14:08 |
ubuntourist | So the first copy in git would be 2300+ lines, but then the first change would be... maybe | 14:09 |
ubuntourist | four lines -- two lines changed, which "git" would store as two lines deleted and two lines added. | 14:10 |
ubuntourist | The next change might only be deleting a line. Or adding one. | 14:10 |
ubuntourist | So now, after ten changes, "git" will have maybe something like 2,340 lines instead of 23,000 lines for the changes to lvm.conf. | 14:11 |
ubuntourist | A lot of savings in disk space. | 14:12 |
ubuntourist | Going back to the diff in the tmate: | 14:12 |
ubuntourist | The lines that start with "This file is not" and "See /usr/share/doc/..." are not very different in both versions. | 14:14 |
ubuntourist | I simply changed the "word wrap" and capitalized the letter "S". Very minor changes, just to show you some | 14:14 |
ubuntourist | RED "-" lines. | 14:15 |
ubuntourist | You can see that the text in the bottom of the green section is the same as the red section. | 14:15 |
ubuntourist | The more useful changes are the "Last modified" comment and the "2023.09.22" comment. | 14:16 |
ubuntourist | When I edit a file -- especially a file that I am not including in a "git" repository -- I try to ALWAYS have | 14:17 |
ubuntourist | that type of comment at the start. | 14:17 |
ubuntourist | I just copied the .profile from my personal computer up to the server to show you what I mean about commenting. | 14:19 |
ubuntourist | I have a record of all the changes that I made to my copy of the original /etc/skel/.profile that was created when I | 14:20 |
ubuntourist | installed Linxu on my computer. | 14:21 |
ubuntourist | Now, on the screen, you can see the original part "This file is not read by..." and "see /usr/share/doc/..." | 14:22 |
ubuntourist | Scrolling down a little more,,, | 14:22 |
ubuntourist | I like to repeat the comment at the top of the file near the actual change. So | 14:23 |
ubuntourist | # 2019.12.28 KJC - Switched to systemd path for private bin | 14:23 |
ubuntourist | in the middle of the screen is the same comment that appeared at the top of the file, but now it is | 14:24 |
ubuntourist | appearing right where I made the change. | 14:24 |
ubuntourist | Let's "diff" it with the original... There will be LOTS of differences. Mostly GREEN "+" additions to the original file. | 14:25 |
ubuntourist | (I made a demo directory, because I do not want to have all of my changes in the "real" ~/.profile. | 14:26 |
ubuntourist | Many of those changes are for my machine only, because I have packages that are not on the server. | 14:27 |
ubuntourist | So the changes effect audio, video, programming languages, editors, and other software not on the server. | 14:27 |
ubuntourist | So, you can see by scrolling there is very little RED "-" stuff. Almost everything is an addition to the file not a deletion | 14:28 |
ubuntourist | or a change. | 14:28 |
ubuntourist | scroll down to the RED. | 14:28 |
ubuntourist | Too far. You went past the RED. | 14:29 |
ubuntourist | Good. | 14:29 |
ubuntourist | Stop. | 14:29 |
ubuntourist | So. The white lines are the same as in the system-wide /etc/skel/.profile that everyone starts with. | 14:30 |
ubuntourist | From the RED lines, it I can see that I've changed a lot of the file relating to the PATH environment variable. | 14:31 |
ubuntourist | From the GREEN lines, I can see that most of the changes are | 14:31 |
ubuntourist | PATH=...:$PATH | 14:32 |
ubuntourist | In Python this is like typing: | 14:32 |
ubuntourist | my_story = "...The End." | 14:33 |
ubuntourist | my_story = "Once upon a time" + my_story | 14:33 |
ubuntourist | I am taking the original PATH environment variable -- which, last time we learned is where the operating system | 14:34 |
ubuntourist | tries to find executable programs -- and I'm adding new locations for the system to look for executable programs. | 14:35 |
ubuntourist | Are you understanding and remembering what we did last time with PATH? | 14:35 |
tboimah | +1 | 14:35 |
ubuntourist | Most of the changes in the file were adding directories for searching to the PATH environment variable. | 14:38 |
ubuntourist | There were other environment variables that I created that are used by other programs. | 14:38 |
ubuntourist | For your users (mostly students), you may want to set up environment variables for shared resources. | 14:39 |
ubuntourist | Several weeks ago, we looked at creating directories and files that we could share. | 14:39 |
ubuntourist | We set permissions so that other users could change files and create files in our personal directories. | 14:40 |
ubuntourist | You could set up directories for each class, and then give permission for students in those classes to | 14:41 |
ubuntourist | create files, or maybe you would have directories that contain documents for students to read -- like the Linux Command Line Book | 14:41 |
ubuntourist | You could invent a new environment variable in /etc/skel/.profile that points to shaared directories. | 14:43 |
ubuntourist | For example, -- DON'T DO THIS ON THE SERVER YET: | 14:43 |
ubuntourist | sudo mkdir /usr/share/doc/MCSS/ | 14:44 |
ubuntourist | sudo cp Linux_Command_Line_Book.pdf /usr/share/doc/MCSS/ | 14:44 |
ubuntourist | and then add lines to /etc/skel/.profile: | 14:45 |
ubuntourist | # 2023.09.22 (MK + TM) - Set up shared student documentation path | 14:46 |
ubuntourist | MCSS_DOC=/usr/share/doc/MCSS/ | 14:47 |
ubuntourist | ,,, | 14:47 |
ubuntourist | Now, when you create new usernames for each student, you can tell them, "If you want to look at the documents, type | 14:47 |
ubuntourist | cd $MCSS_DOC | 14:48 |
ubuntourist | ls | 14:48 |
ubuntourist | ... | 14:48 |
ubuntourist | Understand? | 14:48 |
ubuntourist | You can try this on your own computers -- NOT THE SERVER YET. | 14:49 |
tboimah | okay | 14:49 |
ubuntourist | (You will need to also create a new user to test it out: The changes you make to the /etc/skel/ files WON'T be copied to your | 14:50 |
ubuntourist | existing directory. Those files are only copied when a new user is created. They do not affect existing users. | 14:51 |
ubuntourist | mulbah, how about you? Are you understanding okay? | 14:51 |
mulbah | understanding small small but I will e-mail you what I learn and what I don't understand | 14:52 |
ubuntourist | mulbah, good. | 14:53 |
mulbah | right I just putting less time to the teaching | 14:53 |
ubuntourist | I am probably not organizing the lessons very well. I am trying to think about all the things that I do | 14:53 |
ubuntourist | frequently, but there is so much to practice. I think maybe for a while, I will give you tasks to do on your computers, | 14:54 |
ubuntourist | so that you can experiment and bexome more comfortable doing the work instead of reading what I type. | 14:55 |
ubuntourist | I talk too much, and need to listen and watch more. | 14:55 |
ubuntourist | I think I will call it "quits" for today. | 14:56 |
ubuntourist | I will send the history with some explanation in e-mail. | 14:56 |
ubuntourist | See you Friday. mulbah, I hope you are feeling better by that time. | 14:57 |
tboimah | okay thanks for today | 14:57 |
mulbah | Okay Mr. Cole | 14:57 |
ubuntourist | Bye! | 14:57 |
mulbah | Thanks for today | 14:57 |
mulbah | Bye! | 14:57 |
tboimah | have a nice day | 14:57 |
*** ubuntourist has quit (Quit: Leaving) | 14:57 | |
*** tboimah has quit (Quit: Leaving) | 14:57 | |
*** mulbah07_ has quit (None) | 15:14 | |
*** mulbah has quit (Ping timeout: 480 seconds) | 15:19 | |
*** Ved has quit (None) | 18:13 | |
scooper | !agenda | 18:30 |
LittleWebster | Warning: There are no items on the agenda! | 18:30 |
scooper | !add The Rural Cooking Project | 18:31 |
LittleWebster | Success: "The Rural Cooking Project" has been added to the agenda. | 18:31 |
scooper | !agenda | 18:31 |
LittleWebster | This is the agenda for the next meeting: | 18:31 |
LittleWebster | The Rural Cooking Project (added by scooper) | 18:31 |
scooper | !add Updates from each group | 18:32 |
LittleWebster | Success: "Updates from each group" has been added to the agenda. | 18:32 |
scooper | !add AOB(Any other Business) | 18:33 |
LittleWebster | Success: "AOB(Any other Business)" has been added to the agenda. | 18:33 |
scooper | !agenda | 18:33 |
LittleWebster | This is the agenda for the next meeting: | 18:33 |
LittleWebster | The Rural Cooking Project (added by scooper) | 18:33 |
LittleWebster | Updates from each group (added by scooper) | 18:33 |
LittleWebster | AOB(Any other Business) (added by scooper) | 18:33 |
*** scooper has quit (None) | 18:33 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!