This is Hacker Public Radio episode 3,928 for Wednesday, the 23rd of August 2023. Today's show is entitled, Reclot 2. It is hosted by some guy on the internet and is about 24 minutes long. It carries an explicit flag. This summary is, scoty confuses everyone with bash nonsense. You are listening to a show from the Reserve queue. We are airing it now because we had free slots that were not filled. This is a community project that needs listeners to contribute shows in order to survive. Please consider recording a show for Hacker Public Radio. Hello and welcome to another episode of Hacker Public Radio. I'm your host, some guy on the internet. Today I'm just going to wrap it fire a few shows right off the cuff. We need shows and I'm going to give shows. Now these won't be the highly polished, wonderful, scrumptious goodness that you're used to getting from the old known news. But you're going to get them anyway and you're going to like them. In this episode, we're going to talk about Clot 2 and his 10 most known commands for new cloud admins. We give some wonderful commands in that show and I really enjoy that show. But let's see, this is my moment to build on the shoulders of giants. That's right. I am now going to build on the shoulders of Clot 2. So he may look over on his shoulder, left already the one of his choosing. And find that I am now pouring concrete for a solid foundation to construct a monstrosity on to his shoulders. In first thing he mentioned in that show. Great show, by the way, I just want to get that out the way. Qback or Qback. Something, I don't know what that one is. That's all about Kubernetes and dealing with the, I guess, Kubernetes applications. I personally have not learned to speak Kubernetes yet. So yeah, it's, it's outside of my, my pay grade. But I'm going to take you over to curl. I enjoy me some curl. I think that was an excellent tool to give. I also want to mention W get. I prefer W get the most because you can accidentally download the entire internet with W get. And I think that is a feature that you should definitely keep in mind. See, in open source, we provide you with tools that, that if you do not specifically say, do not download the entire internet, you will then download the entire internet. So curl is nice. But W get should definitely be considered. Now he, he mentioned tar and unzip. These are great, but I can't do it service without first talking about bash and bash scripting. In fact, the rest of these, I'm just going to ball all of them up into my love for bash scripting. Alright, bash scripting is like duct tape. But instead of being like some sort of clothy plasticy material with adhesive on it, I want you to imagine plastic. Some space aged mythical material that is strong and flexible, you know, just durable yet unbreakable and adheres to anything. That's bash. Alright. So it is wonderful and ideal, but you really should be careful using it. With all of that said, I put that blank on everything, just like the lady in the hot sauce commercial. I will bash it up. I'm the guy that created the meme for don't bash cat with pipe. You understand? I'm bashing it. Because how else are you going to learn? You understand? When you're out there doing these different things on your system, say for instance, you're using tar. Tar is a part of my own personal backup. When I'm creating tar balls like mad, I need a way to do that as fast as possible. Even if I accidentally tar something that I don't need, who cares as long as it's tar it's fine. So that's why I use a script. I use bash. I hop in there. I create some f statements and other things that take tar and have it just rapid fire in the direction of files. Tard is tar rarely disappoints. Sometimes there's the odd that's not a real file or certain file names like Colibre and their library will decide to, for whatever I really don't understand why, but they put a space in the name of their library. So, you know, I mean, I'm not the library of the directory. You would think by now, first of all, you would not want to put your directory in the home directory, polluting my home directory with nonsense. Oh, my God, that music is loud. I'm listening to music while I'm making a show. Okay. Okay. We kind of take care of that. But, you know, first of all, you would not want to just blast your directory where you store all your stuff at in the home directory there. There's like the dot config. There's the dot cash. You know, there's areas for you to put it that not just directly in the home, but never mind that. That's not what the show is about. Even when some irresponsible program decides to do this, tar does not disappoint. We will just tar that puppy right on up through a script. And when it comes to zip files, here's another thing about Linux. You have a zip command, and then you have an unzip command. Now these commands from understanding may be different programs. Or maybe they're just, I don't know. I think they're different programs, and the other one unzips, which is crazy. Don't use it. Just use tar if you're in Linux. If you're dealing with someone on windows, I understand why you'd be using zip. So it's there in case you need it. But there's a wonderful, well, I'm going to, I'm going to leave a copy of my bash R.C. No, not my bash R.C. My bash aliases in this show notes. All right. So that it can confuse you to no end. You're going to be wondering why on earth is all this nonsense in there because it's helpful. Show mod is another one, right? When you have a ton of different files that you're dealing with, being a privacy focused individual, like myself, I deal with privacy insecurity quite a bit. And I like to just dig into as much as I can and take full advantage of it, where I can. And one of the things I noticed when you're creating files, permissions are not exactly liberally granted to the files. You know, they don't just throw execution on everything, but they do add read and write among the groups. Right? So you'll get owner. You'll get groups and others. So to speak, I have a nice little script with show mod that I use is called perm for permissions, you know, short for permissions. I'm actually now that it's finished because I made it a separate script until I got it working without blown up my system. Now I'm going to put that into my bash R.C. as a function, or not bash R.C. Sorry, I keep saying bash R.C. is to bash aliases, which is attached to the bash R.C. or your bash profiles, however you want to attach it. But either way, it allows me to interface with my system through the terminal through special functions and aliases that I want to use while keeping a very vanilla bash R.C. Again, if you're in Normie and you just heard me say all of that, you're just completely confused and ready to get away from here. I don't blame you. But if you decide to stick around for just a little bit longer, understand, you're going to begin to change at night when you go to sleep, you're going to start to transform a little bit because you're listening to geekery of the highest level. All right, then Cloud 2 also talks about using dot slash for your scripts. I love that. He's absolutely right. When I'm creating in my playground, I do use the dot slash a lot to reference a strip in the current directory. So let me talk a little bit about that. Dot can be used for sourcing. So when you're sourcing a file, you can't just use dot space that file and source it. When you use a dot forward slash, you are sourcing from the current directory and then a file after that slash would be your sourcing that file in the current directory. That is my understanding of it. If I'm completely wrong, this is your obligation to do a show and correct me. And if you do not do a show within the next 48 hours, then I'm correct. You're the one that's wrong. Then the CD command is a special one. I like CD. I created my own little function, which uses CD. All right, so let me just explain it just a little bit because you're going to see it down in my bash aliase. CD is a bash built in, right? So when you're using CD in a function in your bash aliases, you want to go ahead and specify that CD command is a built in. Otherwise, you may not get the results that you want. So you're going to specify built in for that CD. And what I do is I created my own function called CD, which is the same as the bash built in, but within that function, I specify it as a built in. And then I add all the additional things I want to do to it. So for me, I just make a sample. Whenever I CD into a directory, I always run LS, right? I CD into a directory, and then I want to know what's there. So I create a function that calls the built in CD, and then does the double amp for sound, and meaning if the first command runs correctly, also run this additional command, which is the LS with group directories first, and in a few other things, you know, human readable, as heterocenter, whatever you want, add all that in there. So every time I use CD now, I automatically go into that directory, and an LS is ran. To give me the files that are in their directory. Sounds small, but it is 100% nerd level useful. All these little small things add up. Now, I believe, Cloud2 also did another show, and it has navigating around your system in ways other than CD, and he mentioned push D, pop D, also bash built in. Your bash shell has these as built in, I guess, functions. So let me talk to you a little bit about how I use push D pop D. First thing, I take push D, and I ALA is that to just PD. So I don't have to type in the full push D, right? Just like you do with CD as change directory. It's just CD, well, same thing with push D, I just do PD. Now, PD in my directory is like normal. But here's the thing. I normally have a certain set of directories that I always work with, let me just make sure that my file manager is, I mean, number five manager, my password manager is closed. I had it just sitting there, and it was bothering me. You know, I'm not using it, but it's, it's the crypt, it just opened like that. You know, almost like I just didn't do a show not too long ago about the very same thing. When you're, when you're pushing and then pop D in around, I kind of got a little, oh yeah, I have a function in my bash aliases. It's called push up. That's right, like the exercise you're doing to push up. Basically, all this does is pre-populate a stack. The push up, the push D stack is pre-populated through this function. So these directories that I always end up going into, always doing something with for whatever reason. Like, I'm always jumping in the Thunderbird directory, dealing with my, my, my filters, right? So I'm not even typing in stupid, long sub-directory string of nonsense to get down there. It is going to be pre-populated when I type in push up and then I'll just be able to do a PD space plus whatever the number that directory is in my stack and boom, I'm automatically there. So I'm just push D in all over the place. I rarely even use pop D. Whatever ends up in the stack is just there now. All right, that's where you live now in the stack. You don't ever come out until new session. And once I'm done there, I also have things like where I have where I have my different them sessions that I want to manipulate and do stuff with as well as all my hacker public radio show notes, directories and things of that nature. I'm not going to be typing that crap in every single time. Right? I just do push up and guess what, pre-populate. All right, I know I'm going to go there at some point. So why not just have it all pre-populated. All right? So now I just do a PD space plus and the number that is, you know, to that directory. And there you go. I'm done. And I also didn't alias for DERS. That's DIRS. You have to forgive me. I don't recall the natalphonic alphabet at the moment. So you have to forgive me. But I alias DERS with the L flag. So that way it gives me the long list that shows the entire directory. You know, the sub-director is in the strength and also gives me the number to it. So that way I know how to immediately, you know, whenever I type in DERS, I don't have to always do the flag. It just knows to do the flag for me because it's an alias. And now I can just move quicker. I can just do PD, number, go where I gotta go. So that's how I'm moving around the system. My bash alias is, is like, consider like an API to the system. I get access to my system with custom features that I want to use without polluting my actual bash RC. So the bash RC stays relatively vanilla. The only thing I do is comment out whatever custom LS commands they put inside the bash RC because I've got my own LS commands that I want to use or LS aliases. So I'll comment those out and allow my bash aliases to take over from there. Now you can reference your bash aliases through your bash profiles or your bash RC either one. It doesn't just a simple F statement that I'll allow you to do that. And I drag mine around right there. I'm on, you know, a deviant slash up on two base distribution or a fedora, DNF slash. What was it used to be? Yum. Base distribution. Didn't matter. It'll recognize that bash alias. So long as you got that F statement and now they're the profiles or the other thing as mentioned. Now what I used to do before to push the thing because I knew about push the for a while, and never used it. I used to use as plateau mentioned in the other show how to navigate your system from the terminal. I used to use variables for the things that I was doing right because like, here for instance, I have an N directory within my downloads directory. So there's an N sub directory. There's downloads and then there's sub directory N sub directory out. Whenever things come in from Firefox, they automatically get stored in downloads slash N. When everything's needed to be emailed out or sent to like hack a public radio or show or whatever, those go to downloads slash out. So I would basically have a variable for N in a variable for wherever I want to file to go to when, like so, for instance, I get the latest key pass XC app image, because I like using app images. I got this habit because if you use Caden live from the old days when that sucker would just blow up and crash on you at a more, you know, it'd be just finding to you update and then all of a sudden it just destroys. So you just learn to use app images because it will never update. And you just learn to love the fact that it will not change or new. I think that's why people love Debbie and so much. You use Caden live in the past. And that sucker just one day just exploded on your, on your file system, destroy any chance of you getting worked done that century. And you learn to just love things that never change. So you chose Debbie and or app images. But I'm getting a little distracted now. But yeah, I used to use variables and not get that new app image right. I stored the name of that app image in my variable. So now I can change the permissions of it. Or I also have another, I think it's a function now. If it's not a function, it's still a script. But it's called Better File Names. It was BFN, but it's called Better File Names. Basically it take all the spaces out of the name and replaces them with dashes. And if other special characters get replaced with dashes, you know, the hyphen. If you're in a query keyboard and American query keyboard is the dash is in between the zero and the equal, I guess. Yeah. So yeah, I used BFN to correct the name. Then I can use perm to change the permissions to make sure that only the user permissions are held. And because it's a regular file, my perm script for permissions is, it'll automatically give it read right with no execution for the user, not the group or anything else. So I believe that this show mod plus equal 600. For directories, it's very similar set plus equal 700 for directories, because you need execution for directories, unless you do not want that directory, access for whatever reason. Like if you temporarily want to disable a program from access and that directory, you can change the permission of that directory to exclude execution, which will no longer allow that program to access that directory for whatever test you're performing, and then just change it back when you're done. But never mind, I'll let them get into, I'm getting into too much nerd or tree. But yeah, in that case, I have my directories stored into variables, and then I use another command, the MV command that Cloud2 has now mentioned in the show, use MV with the V flag and the T flag. The V flag is verbose, so I get a nice little report that it was sent where I thought it was sent, and the T flag is to the destination where I wanted to go, so the destination is going to be the variable that I'd stored, so I'm in the download and, but I want to send this app image to my local band, right? So if you do not have a local band, you can go in your dot local, which is located in your home directory. There may not be a band folder in there, but if you didn't know if you're new, being you're coming here for some ultimate geekery, you just go ahead and put a dot, go into your dot local, and you put a BI in, all or a case in there, and when you restart your system, that band should be added to your system's path, that is a local binary directory. Once you restart your PC, and now you don't have to restart, you can just manually add it, but you're normally in your bash RC, that automatically, or your bash profiles, that'll make sure that your path is updated with that band, but again, too much geekery for you. I got to slow it down. You throw your app image over there, and that band, because you can then call that, but you can call that app image, just like you would any binary from your path, and load it right from the terminal. It's excellent. Well, once it has the proper permissions, because you are going to want to do your task on it, like, for instance, if you're getting from keep pass XE, they have their signatures, and everything aligns, you are going to run the, the hashes on the program, to at least have some understanding. So long as the site has not been compromised, and the information on the site has been validated, but keep pass XE team, those signatures should match up. They give you a GPG in Europe, and you're other checksum, to confirm that the, the file is exactly what they intended for you to have. So once you confirm that, you're throwing your band, and guess what you do now. You just type the name of that file, and because you're doing like I'm doing, and you're using a better file name, script that made it something reasonable, where you won't have capital letters, and periods, and nonsense, and spate, you know what I mean? You changed that so that it's decent, and you can just do a lowercase key pass, and hit tab to complete the rest of that, because they're going to have some gibberish in there, you know, the number for the app image, and all by the way, when you're doing your checksum's invalidation, you want to do all that before you start altering the name of the application, because the signature and everything, it has to match before you do all of that. So yeah, just a little note there. Again, too much geekery, throw it into your band, and I'm getting lost in my nerdism right now. Throw it in your local band. Now, anywhere in your file system, you should just be able to call it, because it's in the path now. You understand? This is the way, just like in the Mandalorian, right? I'm just going to hold some sort of intergalactic pistol in today, and show you this is the way. And then I'm going to fumble around with it, drop it, and it's going to fire, and we're going to pretend like we didn't do that. So I think I covered most of the commands here, set for sudo. I can't remember if class 2 covered this or not, but any event that you keep forgetting to type pseudo, whenever you do a command, like update and upgrade, you keep forgetting to type in pseudo there. Well, you can just do the double exclamation mark, like pseudo double exclamation mark trick thing to redo that command, but with pseudo, and you're good to go with that. So that's a quick and easy little bit of nerd or tree that gets you back up to speed. Now echo. Echo is by far one of my favorite commands. And it is, whenever you're about to do any kind of scripting, and you're doing all these f statements and functions and nonsense are in there, and it is very important to give yourself a way out, not only do you write the thing that you want to happen, but you need to also be aware that this could possibly all go wrong, and you need to control the unexpected, it'll lease a little bit. So that's when I use echo, so that in, let me just explain this to you and I go ahead, prepare yourself, you're going to need to take a seat for this part, because this is massive, all right. I use echo as an else, for conditions not met through the original call of F, echo good heavens, all right. Do you understand what I'm saying? That way, whenever I do something, it does not work, and I'm just ready to just blaze through a workload, and all of a sudden, get an error, that good heavens alerts me to just snatch the PC cable out of the wall, and leave the house, because I am done with this for now. So if you have benefited at all from this ultimate nerd show of pleasant geekotry, you make sure you head over to Hacker Public Radio right now, and you upload a show. If you disagree or have anything more to add to this, well, all disagreements should go to either Black Colonel or Archer 72. Make sure that they know exactly why you're not happy with this, but if you are happy with it, then you do a show. And remember that, that what did I say earlier, 24 hours or 48 hours or whatever, if you do not do a show disagreeing with me, within the next 24, let's say 48, just to give you a great spirit, within the next 48 hours of the release of this show, if you do not do a show in reply, disagreeing with whatever statement I've made here, or even if you do agree. But mostly if you don't disagree, then my statements are true and yours are not. All right, that's the way it works now. All right, you have to put your, you know, you know how to say at weddings, speak now and for ever hold your piece, that's right. I do do a show and speak now, through a show, not a comment, or forever hold your piece. I'm some guy underneath, this is HPR, and these are the 10 most known commands, or a read to the 10 most known commands, as well as how to navigate around your file system, alternate CD, super geek nerdy tree, good day ladies and gentlemen. You have been listening to Hacker Public Radio, as Hacker Public Radio does work. Today's show was contributed by a HPR this night by yourself, if you ever thought of recording podcast, and click on our contribution to find out how easy it means. Hosting for HPR is entirely provided by an onsthost.com, the internet archive and our synced.net. On the satellite stages, today's show is released under a creative comments, attribution for.0 international license. Thanks for watching.