1 00:00:01,570 --> 00:00:04,750 Hello, everyone, and welcome to this lesson. 2 00:00:04,780 --> 00:00:10,540 So till now, we have seen how to copy a file and how to copy a directory. 3 00:00:10,810 --> 00:00:19,510 In this video, we're going to see how can you move or rename files or how you can move or rename directories 4 00:00:20,200 --> 00:00:27,790 before going to see that important thing that you should know is Linux is case sensitive, which means 5 00:00:27,880 --> 00:00:34,420 if you want to see the output of this directory, you cannot type the command, which is capital L or 6 00:00:34,420 --> 00:00:35,470 capital S. 7 00:00:35,470 --> 00:00:37,510 This will give you an error. 8 00:00:37,540 --> 00:00:45,640 Linux do not understand case insensitive commands because Linux is case sensitive or else if you type 9 00:00:45,670 --> 00:00:52,510 L small capital S, it is again going to show you a error because Linux thinks it is a different command 10 00:00:52,510 --> 00:00:53,320 all over. 11 00:00:54,460 --> 00:01:03,430 So if you want to see the output, just type the command ls and small case similarly to file names with 12 00:01:03,430 --> 00:01:10,570 same name but different case is considered to be a different file. 13 00:01:10,660 --> 00:01:12,220 Let me just show you. 14 00:01:12,220 --> 00:01:18,700 So let's say let's create a file which is file or capital E and one. 15 00:01:19,330 --> 00:01:23,080 And you can see I have created an empty file which is file one. 16 00:01:23,110 --> 00:01:24,850 This is also file one. 17 00:01:24,850 --> 00:01:31,510 So I have created two different files, although the name looks exactly the same. 18 00:01:31,510 --> 00:01:36,310 But these both are different files for Linux. 19 00:01:36,310 --> 00:01:44,020 Now, if I try to create a file which is in smaller case, let's see what happens over here. 20 00:01:44,020 --> 00:01:47,200 So let me just see the content of file one. 21 00:01:49,340 --> 00:01:52,730 And you can see it does not create an empty file. 22 00:01:52,760 --> 00:01:56,090 Now let me use Nano to create a new file. 23 00:01:56,210 --> 00:02:00,470 So let's say this is a new file one. 24 00:02:02,070 --> 00:02:04,950 And let me try to save this and. 25 00:02:05,630 --> 00:02:08,300 Let me give the name as file one. 26 00:02:08,720 --> 00:02:15,650 Remember, we already have a file with this name and hit enter and you can see it says file already 27 00:02:15,650 --> 00:02:16,340 exist. 28 00:02:16,370 --> 00:02:17,650 Do you want to overwrite? 29 00:02:17,660 --> 00:02:22,910 So if you want to overwrite, you can say yes and it will overwrite that file. 30 00:02:22,910 --> 00:02:23,750 So. 31 00:02:25,420 --> 00:02:29,830 You can see the file has been successfully overwritten. 32 00:02:30,100 --> 00:02:33,690 There is no new file that will get created. 33 00:02:33,700 --> 00:02:35,620 So I hope you guys understood this. 34 00:02:35,830 --> 00:02:42,850 So now let me just clear the screen for you and let's quickly move a file or rename a file. 35 00:02:42,970 --> 00:02:49,160 So let's say we want to move the file, which is a file one inside the directory, which is two. 36 00:02:49,180 --> 00:02:56,500 So for that, we're going to type the command mov file one and we want to move that into the directory, 37 00:02:56,500 --> 00:02:57,540 which is two. 38 00:02:57,550 --> 00:03:03,080 And also we want to rename the file together in the same command. 39 00:03:03,100 --> 00:03:07,330 So let's say we give the name of this file as Haake. 40 00:03:08,140 --> 00:03:12,820 Let me just hit Enter and let's see what happened inside too. 41 00:03:12,850 --> 00:03:16,840 So let's simply type three two and see what is inside. 42 00:03:17,050 --> 00:03:22,840 So the directory two already has a file which was created previously. 43 00:03:23,020 --> 00:03:30,520 Remember, we have already created this file previously in previous videos and a new file has been moved 44 00:03:30,520 --> 00:03:35,400 over here and the name of the file is being changed to hack. 45 00:03:35,410 --> 00:03:40,480 So let's quickly go into and let's see if it is the same file. 46 00:03:40,660 --> 00:03:42,750 And you can see it is the new file. 47 00:03:42,760 --> 00:03:45,130 It is the same file that we created. 48 00:03:46,060 --> 00:03:46,520 Perfect. 49 00:03:46,540 --> 00:03:46,990 Let's go. 50 00:03:47,020 --> 00:03:48,160 One step back. 51 00:03:48,160 --> 00:03:56,230 And here you can see there is no file one, because we have moved the file one inside the directory 52 00:03:56,230 --> 00:04:00,520 two and also have renamed the file to hack. 53 00:04:00,670 --> 00:04:09,490 That is the reason we have the file one moved inside the directory two and the new name hack that is 54 00:04:09,490 --> 00:04:10,240 renamed. 55 00:04:10,240 --> 00:04:16,960 So I hope you guys understood this, how you can move and rename the files into any directories. 56 00:04:17,080 --> 00:04:17,860 Thank you.