In the previous lesson, we saw how to do some of the basic Linux command line commands.
We saw LCD, you name in history.
Let's do a couple of file based commands.
So switch back over to your Linux command line.
Let's start by changing directories to our home directory CD space and then enter that takes us up to
our home.
And now let's change directories to our desktop CD space, desktop.
Good.
And we can use the tab there.
And let's use our ability to make a directory.
Let's make the ah, we'll make a directory called Blah is fine.
And if we move just a little bit here, move our window over, you'll see a folder just popped up,
a new directory or folder called blah.
And if I remove that with R.M. Dear and I hit tab that Blofeld or disappears, so I might have to make
a file called.
My files and we see that my files appears over here, I can copy into my files.
And do unless it's empty right now, but that's OK.
Let's say that we wanted to create a file in there.
Let me clear.
So I'm in my desktop, my files, I could echo some text out to a file and go text into.
Blog, text.
And this little greater than symbol allows me to echo something or type something into a file, and
I've decided to file it, I've redirected this weird text into a file called Blue Dot Text.
I can use the more command to more Balada text and notice, I just have to do buyable tab and it tells
me that it has some text in it.
In fact, if I surf up here to my my files.
I can see blood text is in there and I'll open it up in my text editor and there's my text, pretty
cool.
So we've created a text file from the command line.
So if we list now, we can see the text is there.
Well, let's say we didn't want to name it black text.
We meant to name it my file, that text.
We could either copy that.
So copy blocked text.
To my file, that text.
You know, VLS, I've got two files in there.
Really, what I wanted to do was rename and I don't want my file, that text.
I'm going to I'm going to rename this file by moving it.
I'm going to move the contents of my file, text to text, file that text, move command.
Now, if I list, I have just bloo and text file, notice it and copy it.
Just moved or renamed in this case.
And then if I want to remove that blood text I can R.M. Block Tab and else and notice I've just got
my one text file that text.
Well, sometimes we want to be able to edit a text file a little more easily from the command line,
we can use the nano text editor, so I'll say Nano.
Text or tweet tab, and I get the nanotech senator so I can start typing here, this is some text and
you can move around in here with your cursor keys.
So I can move up, I can move down, I can hit enter to add more lines, this is more text.
I can even type down here.
And that is it does it about a page at a time when I'm finished with my nano text editor, I want to
use a command, I mean, a control.
Oh, and you'll see down at the bottom of the screen here, it has oh four write out an X for exit so
I can write this out.
When I hit control with this filename direct text file, I'm still inside the same text file.
That's OK.
If you wanted to write it as a different name text file too you can hit, enter and then do a control
X to exit.
Now, if I'm more my text file.
I can see the entire contents of this file on the screen, this is some text, this is a more text I
can even type down here, come back up to the top of the screen already to remove that file, less R.M.
text file.
Nothing in there that I'm going to R.M. Deeyah are.
Or you can do a remove dash recursive.
Ah but are MDI are my files and this will only work with an empty directory, but it's empty.
So that worked by list.
There's nothing left in desktop and there's nothing left up on my desktop.
We've seen how to create directories, remove directories, create files, copy files, move files or
rename them remove or delete files and even use the nano text editor and echo echo text into a text
file.
Use the nano text editor to edit that text file a little better and then use the more command to show
the contents of that file.
So we've already got some pretty good command line chops, but we're going to keep adding on to that
in the next lesson.