- MCP server with stdio transport for local use - Search episodes, transcripts, hosts, and series - 4,511 episodes with metadata and transcripts - Data loader with in-memory JSON storage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
611 lines
41 KiB
Plaintext
611 lines
41 KiB
Plaintext
Episode: 3353
|
|
Title: HPR3353: My terminal journey, part 01.
|
|
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr3353/hpr3353.mp3
|
|
Transcribed: 2025-10-24 21:33:17
|
|
|
|
---
|
|
|
|
This is Hacker Public Radio Episode 3353 for Wednesday, 9 June 2021.
|
|
Today's show is entitled, My Terminal Journey, Part 01.
|
|
It is hosted by some guy on the internet and is about 47 minutes long and carries a clean flag.
|
|
The summary is, Becoming Terminal Friendly.
|
|
This episode of HPR is brought to you by archive.org.
|
|
Support universal access to all knowledge by heading over to archive.org forward slash donate.
|
|
Hello and welcome ladies and gentlemen to another episode of Hacker Public Radio.
|
|
I'm your host, some guy on the internet.
|
|
Today, I want to talk to you guys about using the terminal.
|
|
Now, as a new to Linux user, I got a little nervous about the terminal and it was scary
|
|
at first. I mean, scrolling text for days, not exactly knowing what any of that stuff was.
|
|
And I just felt like, man, if I typed a wrong thing in here, either I'm going to able up my system
|
|
or have the, you know, the fads at my door asking me what the hell am I doing?
|
|
So I picked up some resources online.
|
|
One of them was called the Linux command line, TLCL.
|
|
And I'll try to leave a link for that in the show notes down there.
|
|
Reading that document was very helpful.
|
|
Turns out I bought that document about five times through numerous humble bundle deals.
|
|
And so I already had it. I just didn't know I had it.
|
|
But yeah, I went online and I learned about it from the site.
|
|
They have an online readable version and they can, they, I think they also have a download for you.
|
|
We could just download for free. But yeah, I have multiple copies of that.
|
|
And I decided to just start reading it and it's really made things a lot more comfortable
|
|
for me dealing with the terminal and some of the other things that I've seen from
|
|
the users and YouTube and things like that.
|
|
I see people talk about actually using the terminal as like a file manager.
|
|
And I thought, you know, that would be interesting to try.
|
|
And then there are people who use the terminal for email.
|
|
And I thought, wow, that's, you know, that's, I guess that's the thing.
|
|
I didn't really think anybody would want to.
|
|
But yeah, I guess that's the thing.
|
|
Then they're using the terminal as a web browser.
|
|
And I'm like, all right, well, that's also interesting.
|
|
But not sure if I want to do go that far just yet.
|
|
And it's a very powerful tool.
|
|
So I thought it probably good if I know a lot more about this thing.
|
|
So I went, read the book, most of it anyway.
|
|
I didn't get through it all because I had, you know, being father and husband
|
|
and everything all in one.
|
|
You got to get a pick your pick a poison.
|
|
And so I'm here dealing with this book.
|
|
And I thought, man, I'm going to start using this terminal as my file manager
|
|
so I can be extra comfortable with it.
|
|
So one of the things that you start off with, I mean, you learn about CD
|
|
for changing directory, which is super easy.
|
|
And I mean, I thought that, hey, that's that's super easy.
|
|
I can definitely do that.
|
|
You learn about the print working directory.
|
|
WD, I thought that's not really necessary.
|
|
And I wonder why they created a print working directory.
|
|
And some of my research shows that you can actually change that that prompt.
|
|
So you know how when you're in the directory, it actually,
|
|
like on an Ubuntu-based system, it shows you with directory
|
|
you're in alongside the prompt.
|
|
So to show you your username, that you're logged in as with the name
|
|
of the device that you're on,
|
|
then you'll have the directory that you're in right there.
|
|
So I'm guessing in the old days, your prompt was probably something super minimal,
|
|
like a just a dollar sign or something.
|
|
And yeah, you just didn't know where you were.
|
|
So you type print working directory and then it sure you where you were.
|
|
So it's useful.
|
|
It's just now that your prompt actually shows you where you are.
|
|
And I changed my prompt back to that minimal one.
|
|
I went online and learned how to do that.
|
|
I didn't like it. So I switched back.
|
|
So that was pretty cool.
|
|
I didn't know that you could, like,
|
|
all of this flexibility is super unique to me.
|
|
And I'm experimenting with it.
|
|
And I'm a little bit scared at times because this is my main machine,
|
|
where I do all of my work on.
|
|
So I'm like, okay, if I change something,
|
|
I better know what the hell I'm doing.
|
|
Otherwise, you know, I'm going to have to go through a lot of work
|
|
trying to change it back or having for a bit,
|
|
I'm going to have to do a Nuke and pave.
|
|
Even though I'm backed up, I still don't want to have to do it.
|
|
I'm very comfortable running this system.
|
|
Don't want to have to go back and change all my settings
|
|
and things of that nature for my workflow.
|
|
But yeah, experimenting around the terminal isn't as scary.
|
|
So we see the, and one of the things that I've done
|
|
that was super cool that I didn't know you could do either,
|
|
I made a directory in the the documents directory called dump
|
|
or adopt dump, right?
|
|
So mk, let's go into mkdir space dot dup.
|
|
That's inside the documents directory.
|
|
Now I didn't do that in my home folder
|
|
because the home folder is already, I mean, nasty
|
|
with all sorts of stuff in there that I don't even go through that.
|
|
But it just bothers me to have all that stuff in there.
|
|
But I'm not going to mess with that right now.
|
|
So I'm inside of that directory that I created, the dot dump.
|
|
And I thought, okay, I want to start saving all this terminal
|
|
output because when I'm installing documents,
|
|
I mean, I documents, when I'm installing software
|
|
and doing updates and upgrades and all of this stuff,
|
|
for me, I'm just getting long screen of strolling text.
|
|
And I don't know what the hell I'm installing.
|
|
I don't know what any of that means.
|
|
Where's the software even coming from?
|
|
Like, you know, it's, it's strange that I'm just
|
|
typing in a few letters and then stuff's happening at a rapid pace.
|
|
So I want to kind of learn so I can feel comfortable with this process.
|
|
Otherwise, I don't know what I'm doing, you know,
|
|
and I'm kind of afraid to keep using this thing,
|
|
especially for the personal information that I have stored on it.
|
|
And, you know, it just made me really nervous.
|
|
So I figured out that, okay, you can actually redirect
|
|
that output because on the terminal, everything you type from the keyboard
|
|
is your standard input and the stuff that comes out
|
|
on the screen after you've input a command.
|
|
That's going to be your standard output unless it's an error.
|
|
Then, you know, you have your standard error.
|
|
So one of the things I learned about is the T command.
|
|
And the way it was explained to me is it's like a T pipe and plumbing.
|
|
You know, the T pipe allows for the output to go in two directions.
|
|
One, it'll also, it'll stay on the screen like, like,
|
|
you're normally used to seeing the text stroll on the screen.
|
|
And it'll also go somewhere else that you want it to go.
|
|
So it'll just sit now, put into directions.
|
|
Let's go ahead and do a quick example of that.
|
|
So I'm inside my dot dump folder right now.
|
|
And first thing first, I'm going to create a new dump file.
|
|
I have a script.
|
|
Yeah, a new with a script.
|
|
It's so awesome to say that.
|
|
I have a script.
|
|
Now, now I'm like, one of you super cool hacker people out there.
|
|
You know, I got scripts for things now.
|
|
Awesome.
|
|
Let me go ahead and activate that script.
|
|
And basically, what that script is is a,
|
|
it creates a new dump file for me.
|
|
That's all it does.
|
|
It just sets up the file the way I want it.
|
|
And creates that file right in this folder.
|
|
So I don't have to constantly do touch.
|
|
And then add the things in the top of the file that I want to be in there.
|
|
Like, the date that it's created and a few other things in there.
|
|
And I also have a script for upgrade as well.
|
|
That I normally run right after creating the new dump file.
|
|
Now, the reason I create these dump files is because
|
|
every single day, I want to log the things that I'm doing as I'm experimenting with my system.
|
|
And the dump file is named D-U-M-P.
|
|
And then it has the date.
|
|
And the date is formatted as the month,
|
|
the two digit month hyphen,
|
|
two digit day hyphen, four digit year.
|
|
.txt.
|
|
So that way, if I did something yesterday,
|
|
you know, typing a bunch of cool commands yesterday.
|
|
And it, you know, it gave me the feedback I wanted.
|
|
But I didn't have much time.
|
|
It'll be saved in that file.
|
|
And when I come back to it and it's like, you know,
|
|
I'm trying to remember what it was.
|
|
I can go back in that file and check it out.
|
|
Like, you know, it's like a record for me of what I've done.
|
|
So, and I also know about the bad shistery, by the way.
|
|
I'm aware of the bad shistery.
|
|
But this is my way.
|
|
I want to do it my way.
|
|
So I have my dump folder.
|
|
I just created using the script here.
|
|
Let's go ahead and do an L-A.
|
|
And it's actually L-S with the hyphen L for long,
|
|
H for human readable,
|
|
and the capital A for all files without the dot dot.
|
|
If you do a lowercase A,
|
|
it'll show you all files with the dot dot.
|
|
I didn't want that.
|
|
So let me do a clear real quick and do that again.
|
|
So I can have my screen back up.
|
|
So I got a new dump file in there.
|
|
Now, what I do is I'm going to do an update here.
|
|
And I'm going to talk you through sending that output
|
|
into multiple directions here.
|
|
So let's do a pseudo-at-get update.
|
|
Now, we're not going to press Enter yet.
|
|
We know that this text will definitely give us an update.
|
|
But first thing we want to do first,
|
|
we want to set up our T.
|
|
So we hit space.
|
|
Then we're going to hit the pipe,
|
|
which is on the English Query Keyboard.
|
|
That's the keyboard I'm using, the English Query,
|
|
American English Query, pardon me.
|
|
Above the Enter key,
|
|
there is the back slash key,
|
|
which is also below the back space key.
|
|
Now, if you hold down Shift and hit that,
|
|
you'll get a vertical bar that's known as the pipe.
|
|
I inserted the pipe following the update.
|
|
So it's pseudo-at-get update space pipe space.
|
|
And then we're going to do T, which is T-E-E.
|
|
Tangle, echo, echo.
|
|
We're going to do another space.
|
|
We're going to do hyphen.
|
|
And then we're going to do an A for a pen.
|
|
Because if we just do T without the a pen flag,
|
|
it will overwrite the basic setup that's inside the dump file.
|
|
And I don't want to have to redo it.
|
|
I can just run that script again,
|
|
and it'll redo it.
|
|
But I don't want to do that.
|
|
So we do a pen.
|
|
So we can add to that dump file.
|
|
Then we go ahead and mention the file.
|
|
And because we're in the same directory as the file,
|
|
I can just do dot forward slash.
|
|
And then I type DU, hit tab.
|
|
It'll tap complete up to a certain point.
|
|
Because I have multiple dump files in there.
|
|
It'll stop at the point where things are
|
|
similar, you know.
|
|
So the beginning of the files are always going to be the word dump.
|
|
And then a zero.
|
|
Because we're in an early part of the year.
|
|
So it's going to be zero one for January or zero two for February.
|
|
And since we're in May right now, zero five.
|
|
So it's going to stop at zero.
|
|
And I'll type in the five.
|
|
Then I'll type in the first hyphen, zero five.
|
|
And then I'll hit tab complete again.
|
|
So press tab and it'll complete all the way through to the rest of the,
|
|
thing there.
|
|
So now let me just put a semicolon at the end.
|
|
And I'll put a new report at the end of that as well.
|
|
So I do an NRPT for a new report.
|
|
That's a bash alias that I set up.
|
|
So hopefully there's time I can talk to you guys about the bash alias as well.
|
|
Because it's going to be very important that I explain to you the bash alias
|
|
is otherwise they won't make much sense.
|
|
So I have a bash alias for a NRPT.
|
|
That's the, the alias that I'm using.
|
|
And that stands for new report NRPT.
|
|
That's Nevada.
|
|
I forgot what R is Papa Tango.
|
|
I forgot what R is that I'm drawing a blank on that.
|
|
But anyway, I got that in there.
|
|
And now let's do another redirect here.
|
|
Except this time we don't want the new report to splash on the screen.
|
|
So we're not going to use a T for this redirect.
|
|
This time we're going to use the, what are these things called?
|
|
They're called chevrons.
|
|
It's like that the right arrow, which is also on the period key.
|
|
So if you hold down shift and hit the period key twice, remember you have to do it twice.
|
|
You have to put two of those things in there.
|
|
And that will allow me to append.
|
|
If I only put one in there, it would overwrite the vowel.
|
|
So would erase everything that's in there and then replace it with the new report.
|
|
We don't want to do that.
|
|
We want to append the new report to the information that's about to be stored in there,
|
|
which is also this app get update.
|
|
So let's go, we put two of those in there.
|
|
And now let's once again reference dump file here because we're appending to dot slash
|
|
the UMP.
|
|
I'm a little nervous talking to you about this by the way, because I'm a new.
|
|
But let's go ahead and type that in there and get the auto complete.
|
|
I'm going to put another semicolon at the end there.
|
|
You don't need that second semicolon at the end.
|
|
You can just leave it blank, but I just like to put it there and get in and have it
|
|
to use in those.
|
|
And it enter.
|
|
So it's going to ask me from a password.
|
|
Let's go ahead and get that in there.
|
|
There you go.
|
|
And now you got, you know, strolling text.
|
|
It's not that much this time because I update just about every day.
|
|
But yeah, you know, strolling text.
|
|
Now say if I'm busy and I got to walk away right now, I don't have time to read that.
|
|
I just don't need to update for security and all of that, right?
|
|
And same thing with upgrade.
|
|
I'm not going to do an upgrade right now.
|
|
We're just doing this as an example.
|
|
I needed something to work with now.
|
|
If you're not familiar with them or nano and I mean, I like using them now and I've been
|
|
using it a little bit more, but in the beginning, when I was still learning the terminal and trying
|
|
to figure out what the heck am I actually doing here?
|
|
It was a little hard to keep remembering them settings and trying to not screw things
|
|
up.
|
|
So I wanted a more comfortable place to learn.
|
|
So that's when I got VS Codeium.
|
|
So we got our VS Codeium.
|
|
Let's go ahead and open that up real quick because I don't want to, if you're also new and
|
|
you're listening to this, I don't want you to think that you also have to open them and
|
|
do it.
|
|
I want you to feel comfortable.
|
|
So you can open up your text editor.
|
|
It can be Zed if you're on Linux Mint.
|
|
I'm using Linux Mint G editor if you're on Ubuntu, whatever.
|
|
You know, if you use VS Code, VS Codeium, whatever, it all works.
|
|
Let me go down here to VS Codeium and I installed VS Codeium as a snap on Ubuntu and to delete
|
|
that darn file that they had and installed the snap.
|
|
So let's go ahead and now open up that file that we created, that dot dump file.
|
|
I'm going to go over there and get that loaded.
|
|
All right.
|
|
So here we go.
|
|
We now have that loaded up in VS Codeium.
|
|
So we're going to take a look through this file here and we can see that the stuff that
|
|
we just sent into it is in there along with the new report at the bottom.
|
|
Now the reason I put the new report in there is just a separator.
|
|
All it does is as I'm typing in new commands and more and more stuff's pollen up in there,
|
|
it's going to give me a visual indication that there is a blank here to, you know, let
|
|
me know that another command came after that.
|
|
This is where the first commands output and in the second command output begins.
|
|
And you can just inspect it and it's pretty cool because you'll see all these different
|
|
URLs and stuff in there about, you know, the mirrors where stuff comes from.
|
|
And I noticed in there my laptop, I changed it over back to Linux Mint.
|
|
It's the same laptop I did the episode on where I had it running on Ubuntu.
|
|
I changed it back to Linux Mint and I changed the kernel on it as well.
|
|
I didn't know that these systems come with the ability to swap the kernel so that way
|
|
you can, I guess, enable newer hardware.
|
|
And I didn't have to add a new PPR or anything.
|
|
The system automatically came with the selection of kernels that you can use within the 5, 4,
|
|
or range in the 5, 8.
|
|
And I thought, wow, that's pretty cool, you know, so I, you know, look at me, a new,
|
|
nub switching kernel, so this is pretty cool.
|
|
Yeah, but back to the business headhand, let's get back to business here.
|
|
So we have our output and we can inspect it in a comfortable environment where in our
|
|
dot, dot file, and we can just stroll through that and see what, this thing is doing,
|
|
where it's going, what files it's getting, and, you know, just, just know what's happening.
|
|
And then you can actually inspect those URLs, if you want, you could copy them and just
|
|
put them into your browser and just try to figure out what the heck's going on.
|
|
That's basically what I was doing.
|
|
When I do an update and upgrade, I go through there and I just stroll through.
|
|
And then I start learning about the app get or app if you want to because app getting
|
|
app to virtually the same thing is just that app get I learn gives you a little bit more
|
|
options if you wanted to explore or if you're a system maintainer whatever because you can
|
|
also use app cache which is super cool app cache allowed me to do a lot of searching
|
|
for certain things as well searching for different files that are in the repositories I guess.
|
|
Yeah, so let's go ahead and use that real quick.
|
|
So one of the things that I searched for was in map, let's use in map real quick.
|
|
So we can just do apt, hyphen, cache, that's C-A-C-H-E, they're going to do space and
|
|
then we're going to do search all right and then we'll type in the zoo space and we'll
|
|
type in the name of a thing we want to search for so we can.
|
|
So let's go ahead and try this out.
|
|
We do in map so N-M-A-P that's Nevada, Mike, Alpha, Papa in map and that gives us a list
|
|
of things here.
|
|
Now we didn't run that into our file so let's do that again real quick let's hit the
|
|
up arrow key here that'll give us the command we just entered in and if we hit up once
|
|
more that'll show us the command before that but we're not going to do that let's hit
|
|
down go back to the in map search that we created.
|
|
So once again that's app we don't need pseudo privileges because we're just searching we're
|
|
not doing an install.
|
|
So app, hyphen, cache which is charlie, alpha, charlie, hotel, echo and then you know space
|
|
the word search, space, in map.
|
|
Now let's do another space after in map and then we can do the t-pipe or we can just redirect
|
|
all of it using the double things to Chevron you know the greater than symbol or whatever
|
|
do two of those and then we'll send that to the dump file that we created.
|
|
Period slash DUNP05, hyphen05 and then type complete hit enter.
|
|
There we go.
|
|
Now you'll notice if you do that none of your output actually landed on the screen all
|
|
of it went directly to the file so if I go back over here to VS code we will see that
|
|
all of that input is in there and you know you can then in your comfortable environment
|
|
scroll through that and start you know seeing what sort of files it's pulling up and it
|
|
actually pulls up in map in there the network map but it also pulled up a lot of other
|
|
cool stuff in here that I didn't know about and I was doing this with all sorts of stuff
|
|
that I already have installed just you know because it's giving me more output that
|
|
I never knew about and these are different files that also work with in map or related
|
|
to in map or whatever you know so I'm like you know like right down here it's got PSAD
|
|
for a port scan attack detector you know and it's like wow I didn't know that it exists
|
|
I guess that's something I can toy with a little bit later on and I'm just you know learning
|
|
this is my exploring method I can just constantly keep typing in these different things now
|
|
if you're using VS code and it also has a terminal in it so once you get comfortable you
|
|
can actually move to that terminal within VS code and that way you don't have to keep
|
|
switching between code or code and whichever one you're using and your terminal you can
|
|
just use the terminal and code and but for now I'll switch back to the native terminal
|
|
and you know so learning and using app cache to basically explore packages in the repository
|
|
was super cool I can just find out things and I don't even have to go online I don't have
|
|
to open up a browser go to the forms or anything so I've got this little tool within the terminal
|
|
that I'm able to use to explore for myself and just take time learning about these things
|
|
another thing I wanted to because I kept here in the word dependency use so much now
|
|
within app cache we do a man on app cache here sorry about that my nervousness is kicking
|
|
in here but if we do a man on that it has a here we go depends so it shows you the dependencies
|
|
for a file that's another thing I kept here in the word dependencies and I'm reading all
|
|
these different forms and people were using terms like dependency hell and things of that nature
|
|
and I kept thinking about what is a dependency really I wonder you know so I do a man here and
|
|
it shows me that there is a a command that I can use that'll actually show me the dependencies for
|
|
things so there's also there's depends and I think there's another one for show depends as well
|
|
let me take a quick browse through here really quickly I'm sure it's in here it's just that I'm
|
|
a little bit nervous and I'm normally doing this where I don't have to constantly talk while I'm
|
|
doing it so which can use depends for now so that's D E P E N DS so let's go ahead and let me hit
|
|
queue so we can back out of that man page now we're gonna run we're gonna hit up twice to go
|
|
back to the command that we were using which is the app cache search let's go ahead and remove
|
|
the words search there and put in depends D E P E N DS so we're gonna get an app cache space
|
|
depends space in map and then that'll go over to the dump file so let's go ahead and hit enter
|
|
on that and now that was dumped all crap I forgot to put a new report in between there whoops
|
|
well to be alright I know I know where it is because I actually have it open so I can see it so
|
|
now with end map it shows us this little line it'll it'll give us end map and then it'll show us
|
|
the list of dependencies for end map which is pretty cool and now you can you can just say highlight
|
|
this lib c6 is one of the first thing and then there's lib gcc hyphen s1 you can just highlight
|
|
that go over the Firefox and go search with the hell that is right I suppose you can also search
|
|
with app cache as well but I mean the idea is I don't know what this stuff is so I want to know what
|
|
it is I want to kind of figure out more so I can feel comfortable if I know what it is I won't feel
|
|
so bad about installing it right I won't feel nervous like you know am I being am I being monitored
|
|
by some of this stuff like is any of this you know stuff that I ran away from windows with it so
|
|
let me just explore it know what it is feel more comfortable so now that you understand how to
|
|
find the dependencies that are required for a file another thing that I learned I'm not sure if
|
|
this is actually a good thing to do but I've done this with quite a few files but instead of
|
|
installing a file I actually just downloaded a few of them just to see if it was possible and I
|
|
kept them for later on and like when I reformatted my laptop and wanted to install certain software
|
|
on there that I didn't want to download all over again I had certain software downloaded onto a
|
|
a thumb drive so what I what I had done to do that right so as an example here where my dump folder
|
|
I'm going to type in pseudo apt get so apt hyphen get space download whoops I should probably
|
|
go to the man page first but I think it's just download or I think hyphen d also works or whatever
|
|
but we'll do download we'll download dict that's another one of the things that I was using before
|
|
so dict is that spelt because I know it may sound funny the way I'm saying it it's a d i c t
|
|
in that short for a dictionary so we're going to type in d delta i indigo c charlie
|
|
t tango and let's just hit enter oh it's going to need to pass right again ta da so we just
|
|
downloaded dict so now if you wanted to you can go into your file manager and check that or
|
|
what you can do is type in you know ls space hyphen l for long format h for human readable so when
|
|
you get those file sizes that are next to the file instead of it being like stupid long strings
|
|
it'll actually be something like you know so and so megabytes so and so gigabytes and then now
|
|
we can do the uppercase a hit enter and look at that I've now got a package in there called dict
|
|
underscore 1.12.1 a couple of the letters dot dub uh deb right so I just downloaded that package
|
|
for the dict dictionary and uh now I can actually save that onto a flash drive and if I were to
|
|
wipe up my system completely out on the go not not here at home where I have the internet I mean
|
|
like on the go this is why I did this by the way on windows I used to be able to just download
|
|
exes put them onto a flash drive if something were to happen and I needed to read four matter whatever
|
|
it's fine because I can get all of my software back up and running I have the exes and I can
|
|
just reinstall and keep going on Linux I didn't know about file types or any of that stuff so as I'm
|
|
learning with their called and how they're used I learned that you can actually download them
|
|
from the repository without installing them and then save them on something like a flash drive so
|
|
I got 128 gig flash drive here with a few of these files on it that I I know I want to
|
|
reinstall if if because especially with Linux you can do a full system new can pave in like 15
|
|
minutes so once I new can pave out in the field think about it I don't have internet out there if
|
|
everything's just what I have on me well I can just plug this thumb drive in and guess what
|
|
several of the packages that I'm normally used to using I can automatically side load directly
|
|
onto the system and these are packages that come from the repository so it's not like I'm online
|
|
finding them in a place that I'm not exactly sure if they're safe to use they come from the
|
|
system repository so I'm very certain that they're safe and I can just load them and use them
|
|
now the bad part about that one of the things you need to keep in mind if you're going to do that
|
|
you're going to want to update those files every so often because as your system you know repository
|
|
updates you could be using a very old version of files which is okay if that's what you want to do
|
|
right I mean it's nothing wrong with it if you want to use the older files especially for something
|
|
like DICT I'm not worried about any security concerns for that and I also have like all the other
|
|
packages with DICT like DICT DICT WN DICT GCI DE you know all so that way I can use that dictionary
|
|
offline you know what I mean so it's not going to go on the internet to find the definitions
|
|
all of it stored locally and I also have Arthur as well if I wanted to use a visual a graphical
|
|
dictionary and the source because the the Moby Dict Moby Dict the source or as a Dict Moby
|
|
the source whatever it's called that's no longer in here I still have a deb of it but it's no longer
|
|
on Linux meant repository so I'm glad I saved that deb that's another good thing about that you
|
|
can just kind of keep that deb around if you wanted to but yeah it's really cool being able to do
|
|
this with Linux right and like I mentioned earlier the different commands that I have the aliases
|
|
that I have excuse me in my bash RC so let's go ahead and do a CD space and I believe it's the
|
|
tail day remember that's the key to the left of the number one on the Query American keyboard
|
|
hold down shift and hit that and then we CD back to our home let's do a quick LA here and
|
|
there you go you got your bash RC down in there so now we're going to use them to open up that
|
|
bash RC so let's do the I am or you can use nano you know what I probably yeah I'm just going to
|
|
use them you can use nano or VS code and whatever you want to use them I'm just going to use
|
|
them now because I'm already here so them dot bash RC there we go now we can stroll straight down
|
|
and if you want to learn them as new user just type in them tutor all one word them tutor like a
|
|
teacher tutor I know my accent if you're from another country or whatever I might sound a little
|
|
weird that'll get you through them nice and easy so I'm going to talk to you about some of the
|
|
things that I've added into my bash RC to make it a little bit easier for me when I'm doing all
|
|
this exploration in the terminal some of the things I've added is I have a few aliases for LS
|
|
one is the LA which is the LS space capital A lowercase LH then you know you do a space I have the
|
|
dash dash group directories first option as well because I like having all directories then files
|
|
now aside from the LA bash alice also have an LR and an LAR now the LR is basically your LS
|
|
but with the recursive added to oh crap what the something's not right here oh it is okay I see
|
|
how I did that I see what I did there my my recursive I have as the word recursive written out
|
|
rather than the dash R that's another thing I started doing especially when I was doing that
|
|
that script rather than using just the dash R which is the shorthand so if you're typing it in
|
|
at the terminal that'd be a faster way of doing it but when you're putting it into a script
|
|
you want it to be a little bit more readable so here in the bash RC I have hyphen LH space group
|
|
directories first space dash dash recursive so that way it gives me an LS with the recursive
|
|
feature so that way you know I can get more more data another thing the LAR that I have
|
|
which is you know the exact same thing except it it has the LS hyphen A you know the capital A
|
|
LH space group directories first space recursive now there's also one for RM I have another alias
|
|
for RM and the reason that I I had some mistakes but yeah I put the given alias for RM that's
|
|
called RMI for interactive and I also included verbose in there as well and there's also MV I have
|
|
one an alias for that called MVI same thing with CP CPI and there's a few other alias is in here
|
|
for shutdown and reboot and the NRPT that I talked to you guys about for before for a new report
|
|
all that is is an echo with the E flag so that way I can within within that echo using the E flag
|
|
I have a set of quotations and within those quotations I have they're the double quotes by the way
|
|
not the single quotes I have that backslash and backslash and which gives me two new lines
|
|
and then you know new report just the words new report there and then another two new lines
|
|
like blank lines so that there's a space like a gap within the file that just has the word
|
|
new report in in the center of the gap and then whatever the next thing of I'll I'll put all of
|
|
this in the show notes by the way I'll just copy and paste from a bash RC and put it in there
|
|
so that way you can see it because I'm nervous as hell while talking to you about this I don't
|
|
want anybody to think that I'm some expert here I'm toying around with everything all of this is
|
|
just me experimenting and learning and I feel like this is what most people actually do right I mean
|
|
you got a you got experiment in order to know what you're doing and it's fun too it's super fun
|
|
when I don't have my daughter climbing on top of my head and bashing me with toys and stuff it's
|
|
it's really really fun so um one last alias before we do a quick test here with some things
|
|
I have my dot cd well not dot cd it's uh the alias is cd dot dump all one word and all that does
|
|
within that alias I have the change you know the cd change directory space the till day the little
|
|
horizontal squiggly thing and then the directory for my dump file you know uh documents slash
|
|
dot dump so that way I can just type in cd dot dump and it automatically CDs me into that correct
|
|
directory and you can do that for multiple other type of directories if you want to just get in
|
|
there fast and I can actually shorten that up to this cd dot d in fact that's what I'll do let me
|
|
just go ahead and um I think uh with them I can just do three d no no no no because uh I think
|
|
three mmm I'm not even gonna mess with us just to I to go in the insert mode because I don't
|
|
remember what what it was to uh delete just the letters and not the word maybe I had it right but
|
|
I'm not gonna test it here that's not be that brave then we hit escape all right let's uh get
|
|
our colon q no colon wq and that should write and quit our session there so now we can just do
|
|
cd dot d and that'll switch me over to the uh the dot uh the dot dump directory so let's clear
|
|
screen here now when you clear your screen you can type in clear and press enter that'll just clear
|
|
your screen or just control l that was another thing I learned somebody was yelling at another
|
|
guy about doing that in the video you know he kept typing in clear and asked him why don't you just
|
|
do control l and I was like hey does does that really work so I tried it and hey it does work
|
|
another one that learned was control r to uh do searches for the commands that you were
|
|
typing in earlier but if you don't remember what a command was you can do control r and that'll
|
|
pull up but you know the the prompt that allows you to kind of search for that command and it's
|
|
like wow that's super cool now another thing if you want to open files from within the terminal
|
|
so you already know how to cd your way around and get into documents and things that nature so
|
|
let's go ahead and cd back into dump right so I do the cd dot d because I just altered a oh that's
|
|
right I gotta I gotta restart my terminal forgot about that so let's do an exit and then we're
|
|
gonna do a keyboard shortcut to open up a new one keyboard shortcut to go to full screen and then
|
|
we're gonna go back cd dot d because when you change something in your back shot see I'm glad I did
|
|
that you can then shut your terminal down not your computer like just close the terminal reopen it
|
|
and then that'll those changes will take effect so now we're in our dump folder let me do an LA
|
|
to reveal all the things that's in there I need to remove that dick thing but I do it later um
|
|
let's open up that dump file that we have already opened but we're gonna do it this time from the
|
|
terminal which is wonderful so what we're gonna do is we're gonna do x d g that's x delta gamma
|
|
hyphen open so you can just type in OP and hit tab and it'll auto complete so that's x ray delta
|
|
gamma hyphen open the word open all one uh word put a space and then you can just type in the
|
|
thing that you want to open so you can do d u m p for that dump file that I just created and then
|
|
we're gonna do you know the date for the dump file there there we go so I put in the name of the
|
|
file that I want to open that's x d g hyphen open then the name of the file enter there you go
|
|
and it just opened that file in and well actually I had the wrong um I wanted it to open in VS
|
|
podium but the default application for this file is actually z so it opened the file and z so if
|
|
you were to do this with a picture let's find a picture somewhere on my system um actually we
|
|
got a CD into the pictures directory so okay let's do that LA and do I have a picture in here
|
|
yes I do there we go so x d g hyphen open space and let's type in the name of that picture
|
|
there there we go and then hit enter by the name now what do you know it just opened up my picture
|
|
and what is this called let's hit about what is this called x viewer there you go and just
|
|
opened up my picture and x viewer because x viewer is the default application for opening pictures on
|
|
my pc now the only time when you're getting error doing that is when you do not have a default
|
|
application selected for the file that you're trying to open yeah I learned about that one too
|
|
so you can change what your default application is within your menus I don't know how to do that
|
|
from the terminal just yet but I will eventually find out if it's possible I'm sure pretty sure it is
|
|
but so you can change directories you can search for files which is really cool in the terminal
|
|
there's so many ways you can do it I'm learning awk now which you know I was doing it with grip
|
|
right so one of one of the things I was doing let's go back to the cd.dump real quick cd.d I mean
|
|
so we go to the dump part of let me clear my throat all right I know I'm going pretty long here
|
|
but I apologize I'm getting a little excited trying to do this so we're back in our dump file here
|
|
now one of the things we want to do is we want to oh actually this probably won't work for dump
|
|
either way we'll stay here anyway because this is where the actual dump files that I want to use are
|
|
so let's just stay here this is where I do a lot of my work by the way my experimentation
|
|
um let's do an l-a-r and let's remember I'm you know what forget the bash alias because I want
|
|
you to know how to do this as well so you can do an l-s space hyphen lowercase l lowercase h
|
|
uppercase a lowercase r space and then the home folder which is the the till day now that you've
|
|
got that in one of the things that I do for that right like I want to search for a file I don't
|
|
know if it's really in there but I'm I'm searching for space we're going to do a pipe symbol
|
|
and then we're going to pipe that into grip in grip I think it's the I flag so you do hyphen I
|
|
for where it won't case insensitive or whatever and then you can just you know search for a file
|
|
that you think is in that folder you think it's in the home folder you're not really sure let's just
|
|
do I'm just going to type in the word bash there we go enter now I get an output of three
|
|
folders to have the word I'm three files that have the word bash and that's dot bash rc dot
|
|
bash logout and dot bash history so basically I'm able to use the recursive feature to search
|
|
every single directory within the home directory so you know that there's the pictures the videos the
|
|
everything that's in there it searched every single one of those directories including the home
|
|
directory itself for the word bash and then gave me an output of that so now so now you could just
|
|
you know search and it's super cool I'm actually learning to do the same thing with arc with
|
|
and and and modify my outputs using sad and arc as well wow is it it's awesome and read how I'm
|
|
learning all of that stuff is like I mentioned to you in another episode I have like an entire humble
|
|
library so I have tons of books like every time I see programming books Linux books or whatever
|
|
that go on sale I just bought the entire humble bundle thing that they have there so yeah it turns
|
|
it in and because I do that I have tons of duplicates as well so yeah gotta start monitoring that
|
|
but I'm reading them now and I'm becoming more and more efficient at you know using the terminal
|
|
so I can I can move around I can search from files from within any directory I can move files
|
|
around archive files using tar but we're running a bit long so I may not be able to do that now here
|
|
but you guys have an idea of some of the things that you can do in the terminal if you're new and
|
|
listening um it's it's super fantastic I know I didn't give you much of an explanation of what
|
|
grip does I forgot what grip actually stands for general or or is it good new regular expressions
|
|
program or something like that I think that's what it was the new regular expression or general
|
|
something like that but it's it's just deals with regular expressions and my understanding of
|
|
regular expressions so far is basically patterns you know anything that's a pattern so the pattern
|
|
that we just searched for was the word bash B-A-S-H so we searched for that and we we got to three
|
|
results so if you don't know where a file is you can use something like that now I'll make sure
|
|
that the show notes have a little bit of this I'll take some time and try to decorate it to make
|
|
it look nice and put it in there but that's all I have time for I apologize that this went super
|
|
long and then I'm super nervous and hopefully as time goes by and I keep practicing this I'll get
|
|
a little bit better thank you to mr. Ken Fallon for informing me that I was doing it wrong with the
|
|
the uh show intro I didn't read it all the way when I clicked that but and I thought it said
|
|
would you like to insert the show intro outro music I thought that's what I had saw there because I
|
|
was just kind of breezing film excited to upload the show so I'm like yeah yeah put the thing on
|
|
there I like that and that's not what it said at all what it said was did you add it already so
|
|
yeah I apologize for that so yeah I'm gonna make sure I added myself this time and do it correctly
|
|
and again thank you guys for listening thank you mr. Fallon for informing me of that thank you
|
|
everyone for all of your feedback um I've had people email me I've seen some comments on there
|
|
and my god is my head about the size of a truck right now from that last community news
|
|
thing that it did in a uh reveal the thunderbird show that I did last the discussion I came from that
|
|
really made me feel good because when you're nervous and you're new you feel like your input really
|
|
isn't to me you guys are a bunch of elite people that know everything and I'm just this new guy
|
|
coming here trying to talk to you I feel like whatever I'm talking to you about you're like next
|
|
you know you know you don't even want to hear it because you know all of that already so I felt
|
|
like it would just be like one person here that's new just like me that'll benefit from it turns out
|
|
it's interesting to hackers so thank you all and I'm leaving now because I talk too much
|
|
goodbye
|
|
you've been listening to hecka public radio at hecka public radio dot org we are a community podcast
|
|
network that releases shows every weekday Monday through Friday today's show like all our shows
|
|
was contributed by an hbr listener like yourself if you ever thought of recording a podcast
|
|
and click on our contributing to find out how easy it really is hecka public radio was found
|
|
by the digital dog pound and the infonomican computer club and it's part of the binary revolution
|
|
at binrev.com if you have comments on today's show please email the host directly leave a comment
|
|
on the website or record a follow-up episode yourself unless otherwise stated today's show is
|
|
released on the creative comments attribution share a light 3.0 license
|