So there is a couple of commands that is essential for working with files.
ls will list files, mkdir creates directories, cp will copy files, and mv will move files.
rmdir removes directories, but only if they are empty, and rm removes files.
Let me show you.
So I'm in my home directory, pwd for print working directory, we'll confirm that.
And in there, I'm using mkdir some files to create a new directory.
And now I want to copy a file.
So I'm using cp etc hosts to some files.
Now what we are using here, and the cp command should be pretty obvious, it will copy the
file, it will copy a single file, and slash etc slash host is a reference to the file
related from the root directory up.
That's what we call a full path name.
Then we have some files, which is a relative directory name, a relative directory name
is relative to the location where I'm in.
I'm in the home directory.
And in this home directory, I have some files, and that's where I want to copy it into.
And now I can see that when I do ls on some files, there is this hosts file.
Now we can move that hosts file, which is basically renaming the hosts file.
So when I'm using move some files hosts to dot, dot stands for the current directory.
And the result is that now I have my hosts file in the current directory.
Of course, I can also do it the other way around.
Let's do mv square bracket m dash o star to some files.
And then what is happening?
Well, you can see that a couple of files have been moved from the current directory and
are now in the some files directory.
Now let me show you one of the most useless commands on Linux, rmdir, rmdir on some files.
Well, unfortunately, that only works if your directory is empty.
And in most cases, directories are not empty.
And that's what makes rmdir quite useless.
Better use rm minus r, where minus r is for recursive.
So when I'm using rm minus r some files, then everything is gone.
And I've removed all my files again.