Hello, everyone, and welcome to this lesson.
So till now, we have seen how to copy a file and how to copy a directory.
In this video, we're going to see how can you move or rename files or how you can move or rename directories
before going to see that important thing that you should know is Linux is case sensitive, which means
if you want to see the output of this directory, you cannot type the command, which is capital L or
capital S.
This will give you an error.
Linux do not understand case insensitive commands because Linux is case sensitive or else if you type
L small capital S, it is again going to show you a error because Linux thinks it is a different command
all over.
So if you want to see the output, just type the command ls and small case similarly to file names with
same name but different case is considered to be a different file.
Let me just show you.
So let's say let's create a file which is file or capital E and one.
And you can see I have created an empty file which is file one.
This is also file one.
So I have created two different files, although the name looks exactly the same.
But these both are different files for Linux.
Now, if I try to create a file which is in smaller case, let's see what happens over here.
So let me just see the content of file one.
And you can see it does not create an empty file.
Now let me use Nano to create a new file.
So let's say this is a new file one.
And let me try to save this and.
Let me give the name as file one.
Remember, we already have a file with this name and hit enter and you can see it says file already
exist.
Do you want to overwrite?
So if you want to overwrite, you can say yes and it will overwrite that file.
So.
You can see the file has been successfully overwritten.
There is no new file that will get created.
So I hope you guys understood this.
So now let me just clear the screen for you and let's quickly move a file or rename a file.
So let's say we want to move the file, which is a file one inside the directory, which is two.
So for that, we're going to type the command mov file one and we want to move that into the directory,
which is two.
And also we want to rename the file together in the same command.
So let's say we give the name of this file as Haake.
Let me just hit Enter and let's see what happened inside too.
So let's simply type three two and see what is inside.
So the directory two already has a file which was created previously.
Remember, we have already created this file previously in previous videos and a new file has been moved
over here and the name of the file is being changed to hack.
So let's quickly go into and let's see if it is the same file.
And you can see it is the new file.
It is the same file that we created.
Perfect.
Let's go.
One step back.
And here you can see there is no file one, because we have moved the file one inside the directory
two and also have renamed the file to hack.
That is the reason we have the file one moved inside the directory two and the new name hack that is
renamed.
So I hope you guys understood this, how you can move and rename the files into any directories.
Thank you.