1 00:00:06,620 --> 00:00:08,849 In this video we'll talk about moving files. 2 00:00:10,009 --> 00:00:11,750 That's with the MV utility. 3 00:00:12,369 --> 00:00:18,460 So the MV command will move a file and it also is used to rename a file. 4 00:00:19,079 --> 00:00:23,804 That is because renaming a file is really no different from moving a file. Because when you rename 5 00:00:23,804 --> 00:00:28,530 it, you move it from the old name to the new name. And that's how it works. 6 00:00:29,149 --> 00:00:29,969 Let me demonstrate. 7 00:00:32,469 --> 00:00:36,469 Let me start by using Touch TMP test file. 8 00:00:37,549 --> 00:00:39,840 You remember Touch it creates an empty file. 9 00:00:40,700 --> 00:00:45,250 LS l always a good idea if you want to verify that it works? Yay, it works. 10 00:00:46,329 --> 00:00:51,090 Now I'm using MV of TMP test file to Tilde. 11 00:00:52,049 --> 00:00:58,969 Tilde is your home directory and that works. And we should see that I now have test file in my home directory. 12 00:00:59,810 --> 00:01:04,435 And in case you are wondering, could I have done that tilde in a different way? Yeah, as 13 00:01:04,435 --> 00:01:09,060 I was in my home directory, I could have used dot as well. That would also have worked. 14 00:01:09,980 --> 00:01:13,750 Before moving on, let's also verify the TMP test file. 15 00:01:14,290 --> 00:01:16,909 And the TMP test file doesn't exist anymore. 16 00:01:17,730 --> 00:01:20,920 And that is because I just moved it to my home directory. 17 00:01:21,609 --> 00:01:27,724 Now if I use MVTestVal to a FAL, LS is showing that test VAL 18 00:01:27,724 --> 00:01:33,840 no longer exists. A VAL exists and that's what's happening when you move it. 19 00:01:34,540 --> 00:01:38,685 When you move it, you just replace it or rename it. The interesting 20 00:01:38,685 --> 00:01:42,829 thing is that you take all the properties of the file with it. 21 00:01:43,549 --> 00:01:49,974 So permission wise, when you move a file, nothing changes in the permission where you copy a file, 22 00:01:49,974 --> 00:01:56,400 you copy a file to the new destination and it gets the permissions according to the new destination. 23 00:01:57,379 --> 00:02:02,230 That will probably make more sense when later we have also explored permissions and how they work.