*** shmohamud has quit (Ping timeout: 480 seconds) | 00:26 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 01:57 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 03:18 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 03:57 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 05:03 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 07:34 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 10:04 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 11:06 | |
*** mulbah has quit (Ping timeout: 480 seconds) | 12:16 | |
mulbah | clear | 12:17 |
---|---|---|
*** mulbah has quit (Ping timeout: 480 seconds) | 12:35 | |
*** mulbah has quit (Remote host closed the connection) | 12:55 | |
*** mulbah has quit (Read error: Connection reset by peer) | 12:59 | |
mulbah | Hello Mr. Cole | 13:00 |
mulbah | How are you doing | 13:00 |
ubuntourist | Hi. As always, half-asleep, but functional 😉 | 13:01 |
ubuntourist | Sorry about missing last Friday. | 13:01 |
ubuntourist | How are you and who's here? | 13:02 |
mulbah | I'm good | 13:02 |
ubuntourist | mulbah, looks like just you here for now. Are we expecting scooper and tboimah? | 13:03 |
mulbah | I really don't think that they will show up | 13:04 |
ubuntourist | I think I'm just going to start and they can catch up via the logs and talking with you. | 13:04 |
ubuntourist | So, can you summarize for me what you learned last Monday and any experiments and learning you've done this week? | 13:05 |
ubuntourist | I will be continuing from what we talked about on Monday, but want to be sure you remember and understand. | 13:05 |
mulbah | okay | 13:07 |
mulbah | let me start by saying we first started on the ZIP file | 13:08 |
mulbah | understanding that ZIP is a common file format that's used to compress one or more files together into a single location | 13:09 |
mulbah | and also that apt's companion program is "dpkg" for "Debian Package" | 13:12 |
mulbah | that dpkg -l list all the file that have been installed on a computer | 13:13 |
mulbah | and we used that to check if tmate is install on the server | 13:14 |
ubuntourist | All the "packages", not all the files. The reason I wanted to talk about ZIP was because a Debian package is like a fancy ZIP file. | 13:15 |
mulbah | thanks for the correction | 13:16 |
ubuntourist | "dpkg -l" shows the names of the packages. It does not show the files that are in the package. | 13:16 |
ubuntourist | But we can make a short detour right now to talk about that before we get to the next part of last week. | 13:17 |
ubuntourist | Crank up your tmate... | 13:17 |
mulbah | Mr. Cole I really don't understand this egrep -cr "^[[:space:]]*#" * 2> command too good | 13:17 |
mulbah | ssh B9vs6nfGgGxCPtUqbhzjHPMbx@lon1.tmate.io | 13:18 |
ubuntourist | now: | 13:19 |
ubuntourist | dpkg -L tmate | most | 13:19 |
ubuntourist | (use an upper-case L this time.) | 13:19 |
ubuntourist | ACTION waits... | 13:20 |
mulbah | Mr. Cole give me tow minutes I want to do something | 13:21 |
ubuntourist | OK. | 13:21 |
mulbah | ACTION is back | 13:23 |
mulbah | done | 13:24 |
ubuntourist | That command lists the files that are contained in a package. In this case, you are seeing what the tmate | 13:24 |
ubuntourist | package had zipped up inside of it. | 13:24 |
ubuntourist | When you "apt install" it downloads the package and expands the compressed files and puts them in the locations you see | 13:25 |
ubuntourist | in that list. | 13:25 |
ubuntourist | Three important picees we can see in that list are: | 13:26 |
ubuntourist | 1. The executable program "tmate" is in /usr/bin/tmate | 13:26 |
ubuntourist | 2. The manual page for tmate is /usr/share/man/man1/tmate.1.gz | 13:26 |
ubuntourist | 3. Additional documentation is in /usr/share/doc/tmate, but it doesn't look too interesting: a copyright file and a changelog | 13:27 |
ubuntourist | When you use "dpkg -L" followed by a package name, it is useful to know if any of the files are in .../bin/... or .../man/... or .../doc/... | 13:29 |
ubuntourist | directories. If there's something in /usr/bin, it means you can type it on the command line (whatever shows after /bin/) | 13:29 |
ubuntourist | If there's something in a .../man/... directory, it means you can type "man ..." and whatever comes before the number and gz. | 13:30 |
ubuntourist | So, the "tmate" part of the line "/usr/share/man/man1/tmate.1.gz" tells me there is a "man tmate" | 13:31 |
ubuntourist | and sometimes, there are lots of files in the documentation directories. | 13:31 |
ubuntourist | Type "q" and try listing the contents of another package. You choosse the package you are interested in. | 13:32 |
ubuntourist | Remember, you know how to get a list of all packages. So you can choose from that list. | 13:32 |
mulbah | sure | 13:34 |
mulbah | by typing dpkg -l | 13:34 |
ubuntourist | Yep. And you can either scroll through the whole list with most or use grep to choose something from the list. | 13:35 |
ubuntourist | I suggest choosing something you recognize. There are so many to choose from... | 13:36 |
ubuntourist | Either the name of a program you type on the command line or an application you use a lot.... | 13:36 |
*** shmohamud has quit (Ping timeout: 480 seconds) | 13:37 | |
ubuntourist | dpkg -l | grep ... | 13:37 |
ubuntourist | and replace ... with the name of a package that you think might be in the list... | 13:38 |
ubuntourist | Then, if you get an answer you like, use that package name with "dpkg -L" to see what's inside it. | 13:38 |
ubuntourist | OK. So, now, what's in that package? | 13:40 |
mulbah | the package have Kalapi Gujarati Unicode font | 13:40 |
mulbah | the package have "Kalapi Gujarati Unicode font" | 13:41 |
ubuntourist | That is a short description of the package, but I want more details... Is there documentation? Where are the fonts? What directory? | 13:42 |
ubuntourist | Re-read today's chat above. I think you willl see the answer. | 13:45 |
mulbah | I'm not really understanding the question | 13:48 |
ubuntourist | Close! Very close! | 13:49 |
ubuntourist | Stop a moment. What does "grep" do? | 13:50 |
ubuntourist | (Explain what you know about grep.) | 13:51 |
mulbah | it's using to search for matching patters in a file | 13:53 |
ubuntourist | Right. That means it needs a pattern to search for.. | 13:54 |
ubuntourist | Don't try anything yet. | 13:54 |
ubuntourist | Now, explain the the diffference between "-l" and "-L" in the "dpkg" command. | 13:54 |
mulbah | I think -l is to list little part of a file while -L is use to list all about the file | 13:56 |
ubuntourist | "-l" provides a list of packages. If you type "-l package-name" it will tell you if "package-name" is installed. If you do only "-l" it lists all installed packages. | 13:58 |
ubuntourist | it provides a one-line summary of each package, including a very short description. | 13:58 |
ubuntourist | "-L package-name" lists the CONTENTS of a package: Like a zip file, it lists the files that are inside the package. | 13:59 |
ubuntourist | Try the last two commands without the "| grep" | 14:00 |
*** mulbah has quit (Remote host closed the connection) | 14:01 | |
ubuntourist | That was not one of the last two commands you typed... Type "q" and look at the last two commands you typed before this one. | 14:02 |
mulbah | my connection trip just now | 14:02 |
ubuntourist | That was not one of the last two commands you typed... Type "q" and look at the last two commands you typed before this one. | 14:02 |
*** mulbah has quit (Remote host closed the connection) | 14:02 | |
ubuntourist | ACTION sighs and hates this connection... | 14:03 |
ubuntourist | That was not one of the last two commands you typed... Type "q" and look at the last two commands you typed before this one. | 14:03 |
ubuntourist | Type "history" to see your recent commands. | 14:04 |
ubuntourist | That's not it. | 14:05 |
ubuntourist | NO. | 14:05 |
mulbah | is that it | 14:07 |
ubuntourist | Lines 392 and 393.... Those were the last two commands you typed. But try without "| grep" | 14:07 |
mulbah | should I enter | 14:09 |
ubuntourist | Either that or add "| most". Both are fine. | 14:09 |
ubuntourist | Now. Make some guesses: What do you think you are seeing? | 14:10 |
ubuntourist | ACTION is stepping away for a few seconds... | 14:10 |
mulbah | okay | 14:11 |
ubuntourist | ACTION is back and waiting for your thoughts about what you see... | 14:13 |
mulbah | I'm seeing the contest of file in fonts-kalapi | 14:14 |
ubuntourist | contents (like in a book: table of contents) not contest. contents: what is inside. But, yes. | 14:15 |
mulbah | sorry that was a mistake | 14:16 |
ubuntourist | The package "fonts-kalapi" contains the files that are listed. | 14:16 |
ubuntourist | The "dpkg -L" also shows the directories that MAY need to be created, but often are already there and do not need to be created. | 14:17 |
ubuntourist | Interpret the output on the screen now, like this: | 14:17 |
ubuntourist | If there is no "/usr" directory, "mkdir /usr" | 14:18 |
ubuntourist | If there is no "/usr/share" directory, "mkdir /usr/share" | 14:18 |
ubuntourist | ... | 14:18 |
ubuntourist | If there is no "/usr/share/docs/fonts-kalapi" make that directory too. | 14:19 |
ubuntourist | Finally put the file "changelog.Debian.gz" in that directory. Also put "copyright" in that directory. | 14:19 |
ubuntourist | Now, do the same thing with "/usr/share/fonts": If there is no directory, create one... and finally, put a file named "Kalapi.ttf" in the right place | 14:20 |
ubuntourist | after creating all the directories to have a place to put it. | 14:21 |
ubuntourist | So, now you know how to list the contents of a package to learn which files are part of the package. | 14:22 |
ubuntourist | Sometimes, you want to do the reverse: Sometimes, you will see a file in an "ls" command and say "Where the heck did that come from?" | 14:23 |
ubuntourist | "Why is that file on my system?" "Who put it there?" | 14:23 |
ubuntourist | "What is it for?" | 14:23 |
ubuntourist | So, let's find out. Type "q" to quit. | 14:24 |
ubuntourist | go ahead | 14:25 |
mulbah | okay | 14:25 |
ubuntourist | So that's the summary of the package again. It tells you a little bit about what the package does or is used for, and it tells you | 14:26 |
ubuntourist | the version of the package, and what kinds of computers the package is good for (the "architecture") This package is good for | 14:27 |
ubuntourist | all "architectures". | 14:27 |
ubuntourist | Your computer is using an Intel 64-bit arcitecture. Older computers run a 32-bit arcitecture. Some Apple computers are not | 14:28 |
ubuntourist | Intel. And the tiny Raspberry Pi computer is not Intel. It is an ARM arcitecture. Some packages only run on one architecture. | 14:29 |
ubuntourist | type "q" and "dpkg -l | most" and skim the architecture column. For you, because you are running Intel 64-bit, you will either see | 14:30 |
ubuntourist | "all" -- meaning this package runs on all architectures, or amd64 which means it runs on any computer that is using | 14:31 |
ubuntourist | hardware compatible with an AMD 64-bit system including the Intel 64-bit chips. | 14:31 |
ubuntourist | (27 minutes left) | 14:33 |
ubuntourist | ssh freezing? I'm not seeing anything happening in the terminal... | 14:34 |
ubuntourist | scroll right | 14:34 |
ubuntourist | Read the error message. It tells you why that didn't do anything. | 14:35 |
ubuntourist | Well, it tries. It doesn't do a good job really. But it gives you a hint. | 14:36 |
ubuntourist | What did you think "dpkg -L" would do? | 14:37 |
mulbah | I think it will not work it will need one package name | 14:38 |
ubuntourist | Right. | 14:39 |
ubuntourist | It lists the contents of a package. Without a package name, it has no idea what contentss you want to list. | 14:39 |
ubuntourist | But since we're running out of time, I want to move on a little. | 14:39 |
ubuntourist | type "ls /isr/share/doc" | 14:40 |
ubuntourist | OOps. | 14:40 |
ubuntourist | ls /usr/share/doc | 14:40 |
ubuntourist | Now, choose anything from the list, and type "dpkg-query -S /usr/share/doc/..." but replace "..." with something in the list. | 14:41 |
ubuntourist | (Don't think too hard about what to choose. Anything on the screen now is fine for our example.) | 14:43 |
ubuntourist | That was not in the list of what is on the screen. | 14:44 |
ubuntourist | There is no "kolleh" on the screen. | 14:45 |
ubuntourist | OK! | 14:45 |
ubuntourist | It just told you that the file (or directory) "/usr/share/doc/zip" belongs to a package named "zip" | 14:45 |
ubuntourist | You probably could have guessed that for yourself, but sometimes the file names are not so obvious. | 14:46 |
ubuntourist | Sometimes you will have really odd filenames and not know who they belong to. | 14:47 |
ubuntourist | Damn. I thought I was going to pick somethng that had a package name that was different... Oh well. | 14:49 |
ubuntourist | There's a better example: There is a command in /usr/bin named "unzipsfx" | 14:51 |
ubuntourist | I asked "which package does it belong to" and I learned that it is part of the "unzip" package. | 14:51 |
ubuntourist | But "unzstd" is NOT part of the "unzip" package. It is part of the "zstd" package. So, I am curious: | 14:52 |
ubuntourist | I don't know anything about the zstd package... Let's learn more. | 14:53 |
mulbah | okay I will | 14:53 |
ubuntourist | Now show me what all the files in the package are | 14:54 |
ubuntourist | list all the files in the package | 14:55 |
ubuntourist | See how this one has more in /usr/share/doc/? | 14:56 |
ubuntourist | It alsso has more in /usr/bin --- that means there are several commands in the package, and more in /usr/share/man -- that means | 14:57 |
ubuntourist | more manual pages for how to use this package. | 14:57 |
ubuntourist | Scroll down. | 14:57 |
ubuntourist | OK. So, not too many files. But eight commands, eight manual pages, and a little more documentation. | 14:58 |
ubuntourist | One last thing before quitting for today: | 14:58 |
ubuntourist | Sometimes we want detailed information about where a package was downloaded from, and the name of the individual | 14:59 |
ubuntourist | or team of developers that are maintaining the package. What if something is broken? What if there is a bug? Who should I report | 15:00 |
ubuntourist | the bug to? | 15:00 |
ubuntourist | So "q" to quit.... | 15:00 |
ubuntourist | now "apt-cache show zstd | most" | 15:00 |
ubuntourist | This tells us some of the same information from "dpkg -l zstd" but also tells us the "Maintainer" | 15:02 |
ubuntourist | It tells us that the package is not required (it is "optional" | 15:02 |
ubuntourist | It tells us where to report bugs. | 15:02 |
ubuntourist | And at the very bottom, it gives a longer explanation: "zstd" is an abbreviation for "Zstandard" and it talks about "real-time compression" | 15:04 |
ubuntourist | "real-time" usually means the program does something VERY fast. | 15:04 |
ubuntourist | And I mentioned last week that there are different ways to compress a file. Some compress better than others. | 15:04 |
ubuntourist | The "compression ratio" is a comparison between the original size of all the files in the "zip" and the size of the final zip file. | 15:05 |
ubuntourist | If the zip file is much smaller than the sum of all the other sizes, then it has a very high, good compression ratio. | 15:06 |
ubuntourist | (But we don't really care: This was just an example. We found a file that we didn't know about, found wich package it belonged to, listed all the other files in the package, and then got detailed information about the pacckage. | 15:07 |
ubuntourist | ls /usr/bin/unz* | 15:07 |
ubuntourist | dpkg-query -S /usr/bin/unzstd | 15:08 |
ubuntourist | dpkg -l zstd | 15:08 |
ubuntourist | dpkg -L zstd | 15:08 |
ubuntourist | apt-cache show zstd | most | 15:08 |
ubuntourist | Those 5 commands told us a lot of information about a file named unzstd in the /usr/bin directory. | 15:09 |
ubuntourist | Each command helped us figure out the next command. ls gave us the filenames, dpkg-query -S told us the package name, and the other three told us lots about the package. | 15:11 |
ubuntourist | You can try that with other files. Find a file in /usr/bin or /usr/share/doc, or anywhere that is not "/home/" -- because those aren't package files. Those are files that a user has created or owns. | 15:13 |
ubuntourist | Try to figure out which pacckage a file belongs to using "dpkg-query -S" then try to find out information about the package | 15:13 |
ubuntourist | with "dpkg -l" , "dpkg -L" and "apt-cache show". | 15:14 |
ubuntourist | Play around with those commands until you feel like you understand. You don't have to understand all of the information. | 15:15 |
ubuntourist | But if I ask something like "Where would you report a bug if the file /usrt/bin.... is broken?" you should be able to use the commands above to figure out that answer. | 15:16 |
ubuntourist | (... would be replaced with an actual file name, in my question.) | 15:17 |
ubuntourist | And, now we are 20 minutes overtime. So, I'm going to quit now. Good luck experimenting! | 15:18 |
mulbah07_ | okay | 15:18 |
mulbah07_ | Thanks so much Mr. Cole | 15:19 |
ubuntourist | Share the chat with scooper and tboimah, and see if you can work together with the info. | 15:19 |
mulbah07_ | I will | 15:19 |
mulbah07_ | Thanks a lot again | 15:19 |
ubuntourist | We will come back to that ugly "egrep" thing that I was doing last monday at a later time. | 15:19 |
ubuntourist | Bye for now! | 15:20 |
*** ubuntourist has quit (Quit: Leaving) | 15:20 | |
*** mulbah has quit (Ping timeout: 480 seconds) | 15:23 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 16:07 | |
*** mulbah07_ has quit (Ping timeout: 480 seconds) | 17:21 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 18:37 | |
*** shmohamud has quit (Ping timeout: 480 seconds) | 21:07 | |
*** shmohamud has quit (Remote host closed the connection) | 22:15 | |
*** shmohamud has quit (Remote host closed the connection) | 23:43 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!