Episode: 3928
Title: HPR3928: RE: Klaatu.
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr3928/hpr3928.mp3
Transcribed: 2025-10-25 17:31:22

---

This is Hacker Public Radio Episode 3928 for Wednesday, the 23rd of August 2023.
Today's show is entitled Re-Klato.
It is hosted by some guy on the internet, and is about 24 minutes long.
It carries an explicit flag.
The summary is, Scoti confuses everyone with bash nonsense.
You are listening to a show from the Reserve Q. 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.
These won't be the highly polished, wonderful, scrumptious goodness that you're used to
getting from the Oh No News, but you're going to get them anyway and you're going to like
them.
So we're going to talk about Clot 2 and his ten most known commands for new cloud admins.
He gives some wonderful commands in that show and I really enjoyed that show.
But 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 onto his shoulders.
And first thing he mentioned in that show, great show by the way, I just want to get that
out the way.
Cubac or Cubac something, I don't know what that one is, that's all about Kubernetes and
dealing with, I guess, Kubernetes applications.
I personally have not learned to speak Kubernetes yet.
So yeah, it's outside of my pay grade, but I'm going to take you over to Curl.
I enjoyed 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.
In open source, we provide you with tools 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 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
plasticky material with adhesive on it, I want you to imagine Plastille, some space
age 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 that 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, I love 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 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.
Tar does tar rarely disappoints, alright?
Sometimes there's the odd, that's not a real file or certain file names like Calibre and
their library will decide to, for whatever reason, I really don't understand why, but they
put a space in the name of their library.
So, you know, I mean, not the library, 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 the 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 .config, there's
the .tash, 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 my understanding may be different programs, or maybe they're
just, I don't know, I think they're different programs, one zips and the other one unzips,
which is crazy, don't use zip, 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 RC, no, not my bash RC, 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.
Joe 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 and security quite a bit, and I like to just
dig into as much as I can and take full advantage of it where I can.
One of the things I notice 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 Joe 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 RC as a function, or not bash RC, sorry, I keep
saying bash RC is the bash aliases, which is attached to the bash RC or your bash profile
sorry, you want to attach it, but either way, it allows me to interface with my system
through the terminal, through special special functions and aliases that I want to use
while keeping a very vanilla bash RC.
Again, if you're a 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 listen to geekery of the highest level, all right.
Now Cloud2 also talks about using .slash for your scripts.
I love that.
He's absolutely right.
When I'm creating in my playground, I do use the .slash a lot to reference a strip in
the current directory.
So let me talk a little bit about that.
.can be used for sourcing.
So when you're sourcing a file, you can't just use .space that file and source it.
When you use a .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, it 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.
Now 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
alias.
CD is a bash built in, right?
So when you're using CD in a function in your bash alias, 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 simple, 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 sand
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,
etc, etc, whatever you want, add all that in there.
So every time I use CD now, automatically go into that directory and an ls is ran to give
me the, you know, files that are in that directory sound small, but it is 100% nerd level useful.
All these little small things add up.
Now I believe a cloud two also did another show in the past navigating around your, your
system in ways other than CD and he mentioned push D, pop D also bash built ends.
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 aliased 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 direct directories like normal, but here's the thing, I normally have a certain
set of directories that I always work with.
Let me just go ahead and make sure that my file manager is, I mean, I'm a file 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
decrypted, just open 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 pop D in around,
I kind of got a little, oh yeah, yeah, I have a function in my bash aliases, it's called
push up.
That's right.
Like the exercise you're doing a push up, basically all this does is pre populate a stack
to 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 whatever
reason.
Like I'm always jumping in the Thunderbird directory dealing with my my filters, right?
So I'm not going to be 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 it is in my stack and boom,
I'm automatically there.
So I'm just push D and 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.
Once I'm done there, I also have things like where I have my different VIM 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.
And I also did an alias for DERS that's DIRS.
You have to forgive me, I don't recall the natal phonic 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 directories in the string 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.
It's do PD number go where I got to go.
So that's how I'm moving around the system.
My bash aliases is like, consider it 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 RST 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.
There's just a simple F statement that'll allow you to do that.
And I drag mine around rather I'm on, you know, a devian slash up into base distribution
or a fedora, but DNF slash, what was it used to be?
Yum based distribution didn't matter.
It'll recognize that bash aliases so long as you got that F statement and how the profiles
are the other thing as mentioned.
Now what I used to do before to push the thing because I knew about push D for a while,
but I just never used it.
I used to use as platoon 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 say, 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 in when everything's
need to be emailed out or sent to like hacker public radio or show or whatever.
Those go to downloads slash out.
So I would basically have a variable for in a variable for wherever I want to file to go to
when like so when, for instance, I get the latest key pass XC app image, right?
Because I like using app images.
I got this habit because if you use Kaden live from the old days, when that sucker would
just blow up and crash on you at a moment, you know, it'd be just fine until 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 when you answer.
I think that's why people love devian so much.
You use Kaden live in the past and that sucker just one day just exploded on your file system,
destroy any chance of you getting work done that century and you learn to just love things that
never change. So you chose devian 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 a 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 takes 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, an American query keyboard is the dashes 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 not the group or anything else.
So I believe that this show mod plus equals 600 for directories.
It's very similar set plus equals 700 for directories because you need execution for
directories unless you do not want that directory accessed for whatever reason.
Like if you temporarily want to disable a program from access in 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 your performance, and then just change
it back when you're done. But never mind all that. I'm getting into, I'm getting into too much
nerdetry. But yeah, in that case, I have my directories stored into variables. And then I use another
command, the MV command that Klaatu 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 stored. So I'm in the downloads end. But I want to send this app image
to my local bin. Right. So if you do not have a local bin, you can go in your dot local,
which is located in your home directory. There may not be a bin folder in there. Ben stands for
binary. By the way, if you didn't know, if you're a new bin, you're coming here for some ultimate
geekery, you just go ahead and put a dot going to your dot local. And you put a bi in all or case
in there. And when you restart your system, that bin should be added to your system's path
that is a local binary directory. Once you restart your PC, now you don't have to restart,
you can just manually add it. But you're normally in Shabash RC that will that are automatically
or your bash profiles that'll make sure that your path is updated with that bin. But again, too
much geekery for you. I got to slow it down. You throw your app image over there and that bin
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 tasks on it. Like, for instance, if you're
getting from key pass XE, they have their signatures and everything online. So 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 a key pass XE team,
those signatures should match up. They give you a GPG and your other checksum to confirm that
the file is exactly what they intended for you to have. So once you confirm that,
you're throwing your bin 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's decent. 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 oh, by the way, when you're doing your checksums
in validation, 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 notes there. Again, too much geekery. Throw it into your bin. I'm getting lost and
my nerdism right now. Throw it in your local bin. 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 into there
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
except for pseudo. I don't I can't remember if class two covered this or not, but any event that you
keep forgetting to type pseudo whenever you do a command like updating upgrade, you keep forgetting
typing pseudo there. Well, you can just do the double exclamation mark like pseudo double
exclamation mark trick thing to redo that command, but with with pseudo and you're good to go with
that. Alright, so that's a quick and easy little bit of nerdetry that gets you back up speed.
Now, echo echo is by far one of my favorite commands and it is 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 you 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 at least a little bit. So that's when I use echo so that
let me just explain this to you now go ahead prepare yourself you're going to need to take a seat
for this part because this is massive. Alright, I use echo as an else for conditions not met
through the through the original call of f echo good heavens. Alright, do you understand what I'm
saying that way whenever I do something and it does not work and I'm just ready to just blaze
through a workload and all of a sudden I get an error that good heavens alerts me to just snatch
the 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 geeketry, 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 kernel 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 that's 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 grace period within the next 48 hours of the release of this show. If you do not do a show
and reply disagreeing with whatever statement I've made here or even if you do agree,
but mostly if you don't disagree, if you disagree, then my statements are true and yours are not.
Alright that's the way it works now. Alright you have to put your you know how to say at weddings
speak now or forever hold your piece. That's right. You do a show and speak now through a show not
not a comment or forever hold your piece. I'm some guy under the net. 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 narrative tree. Good day ladies and gentlemen.
You have been listening to Hacker Public Radio at Hacker Public Radio does work. Today's show was
contributed by a HPR listener like yourself. If you ever thought of recording podcasts and click
on our contribute link to find out how easy it really is. Posting for HPR has been kindly provided
by an honesthost.com, the internet archive and our syncs.net. On this otherwise stated,
today's show is released under Creative Commons, Attribution 4.0 International License.
