WEBVTT - This file was automatically generated by VIMEO

0
00:00:15.900 --> 00:00:18.400
Hello everyone and welcome to this

1
00:00:18.400 --> 00:00:21.300
 lesson so till now we have seen how to

2
00:00:21.300 --> 00:00:24.700
 copy a file and how to copy a directory

3
00:00:24.700 --> 00:00:27.600
 in this video. We are going to see how can

4
00:00:27.600 --> 00:00:30.700
 you move or rename files or

5
00:00:30.700 --> 00:00:33.700
 how you can move or rename directories?

6
00:00:34.500 --> 00:00:37.800
Before going to see that important thing

7
00:00:37.800 --> 00:00:41.200
 that you should know is Linux is case sensitive,

8
00:00:40.200 --> 00:00:43.500
 which means if you want to see the output

9
00:00:43.500 --> 00:00:46.500
 of this directly, you cannot type the

10
00:00:46.500 --> 00:00:49.400
 command which is capital l or capital S.

11
00:00:49.400 --> 00:00:52.900
 This will give you a error Linux do

12
00:00:52.900 --> 00:00:56.500
 not understand case insensitive commands

13
00:00:56.500 --> 00:00:59.400
 because Linux is case sensitive or else

14
00:00:59.400 --> 00:01:02.300
 if you type L small capital S. It is again going

15
00:01:02.300 --> 00:01:05.200
 to show you a error because Linux things

16
00:01:05.200 --> 00:01:07.400
 it is a different command all over.

17
00:01:09.100 --> 00:01:12.700
So if you want to see the output just type the command LS and

18
00:01:12.700 --> 00:01:15.100
 small case similarly.

19
00:01:16.600 --> 00:01:19.400
Two file names with same name but

20
00:01:19.400 --> 00:01:23.000
 different case is considered

21
00:01:22.200 --> 00:01:25.400
 to be a different file. Let me

22
00:01:25.400 --> 00:01:28.200
 just show you so let's say let's create a

23
00:01:28.200 --> 00:01:29.900
 file which is file.

24
00:01:31.600 --> 00:01:32.800
or capital E and 1

25
00:01:33.700 --> 00:01:36.300
and you can see I have created an empty file

26
00:01:36.300 --> 00:01:39.400
 which is file 1 this is all so file 1 so

27
00:01:39.400 --> 00:01:42.800
 I have created two different files all though

28
00:01:42.800 --> 00:01:45.500
 the name looks exactly the same

29
00:01:45.500 --> 00:01:49.400
 but these both are different files

30
00:01:48.400 --> 00:01:51.600
 for Linux now if I

31
00:01:51.600 --> 00:01:55.200
 click try to create a file which is in smaller

32
00:01:54.200 --> 00:01:55.400
 case.

33
00:01:56.600 --> 00:01:59.200
Let's see what happens over here. So let me just

34
00:01:59.200 --> 00:02:01.300
 see the content of file 1.

35
00:02:03.600 --> 00:02:06.500
And you can see it does not create an

36
00:02:06.500 --> 00:02:09.300
 empty file now. Let me use Nano to create

37
00:02:09.300 --> 00:02:10.100
 a new file.

38
00:02:10.700 --> 00:02:12.900
So let's say this is a new.

39
00:02:13.800 --> 00:02:14.400
file one

40
00:02:16.500 --> 00:02:18.700
and let me try to save this and

41
00:02:19.900 --> 00:02:23.300
let me give the name as file one. Remember.

42
00:02:22.300 --> 00:02:25.100
 We already have a file with

43
00:02:25.100 --> 00:02:28.500
 this name and hit enter and you can see it says

44
00:02:28.500 --> 00:02:31.200
 file already exist. Do you want

45
00:02:31.200 --> 00:02:34.800
 to overwrite? So if you want to override you can say yes, and

46
00:02:34.800 --> 00:02:37.300
 it will overwrite that file. So

47
00:02:39.700 --> 00:02:43.000
You can see the file has been successfully

48
00:02:42.800 --> 00:02:45.700
 overwritten. There is no new

49
00:02:45.700 --> 00:02:48.500
 file that will get created. So I

50
00:02:48.500 --> 00:02:51.100
 hope you guys understood this. So now let me

51
00:02:51.100 --> 00:02:54.500
 just clear the screen for you and let's quickly move

52
00:02:54.500 --> 00:02:57.700
 a file or rename a file. So let's

53
00:02:57.700 --> 00:03:00.500
 say we want to move the file, which is a file one

54
00:03:00.500 --> 00:03:03.800
 inside the directory, which is 2 so

55
00:03:03.800 --> 00:03:05.700
 for that we are going to type the command move.

56
00:03:06.500 --> 00:03:06.900
file

57
00:03:07.800 --> 00:03:10.500
1 and we want to move that into the

58
00:03:10.500 --> 00:03:13.900
 directory, which is 2 and also we

59
00:03:13.900 --> 00:03:16.600
 want to rename the file together in the

60
00:03:16.600 --> 00:03:19.200
 same command. So let's say we give the

61
00:03:19.200 --> 00:03:21.400
 name of this file as hack.

62
00:03:22.400 --> 00:03:25.500
Let me just hit enter and let's see

63
00:03:25.500 --> 00:03:28.700
 what happened inside too. So, let's simply type 3

64
00:03:28.700 --> 00:03:30.800
 2 and see what is inside.

65
00:03:31.600 --> 00:03:34.600
So the directory 2 already has

66
00:03:34.600 --> 00:03:38.000
 a file which was created previously. Remember we

67
00:03:37.200 --> 00:03:39.400
 have already created this file.

68
00:03:40.600 --> 00:03:43.500
Previously in previous videos and a new

69
00:03:43.500 --> 00:03:46.300
 file has been moved over here. And the name

70
00:03:46.300 --> 00:03:49.700
 of the file is being changed to hack.

71
00:03:49.700 --> 00:03:52.800
 So let's quickly go into and let's see

72
00:03:52.800 --> 00:03:55.500
 if it is the same file and you

73
00:03:55.500 --> 00:03:58.500
 can see it is the new file. It is the same file that

74
00:03:58.500 --> 00:03:59.100
 we created.

75
00:04:00.400 --> 00:04:03.500
Perfect. Let's go one step back and here you

76
00:04:03.500 --> 00:04:06.700
 can see there is no file one because we

77
00:04:06.700 --> 00:04:09.800
 have moved the file one inside

78
00:04:09.800 --> 00:04:13.300
 the directory 2 and also have renamed

79
00:04:12.300 --> 00:04:15.600
 the file to hack that is

80
00:04:15.600 --> 00:04:19.400
 the reason we have the file one moved

81
00:04:18.400 --> 00:04:21.900
 inside the directory 2 and the

82
00:04:21.900 --> 00:04:24.900
 new name Hack That is renamed. So

83
00:04:24.900 --> 00:04:27.600
 I hope you guys understood this how you can move

84
00:04:27.600 --> 00:04:30.400
 and rename the files into any

85
00:04:30.400 --> 00:04:31.800
 directories. Thank you.
