1 00:00:07,110 --> 00:00:08,299 - Okay. So, the first command 2 00:00:08,299 --> 00:00:12,600 in this lab is to create TMP files pictures. 3 00:00:12,600 --> 00:00:17,600 So, let me do MK there, old files pictures. 4 00:00:18,256 --> 00:00:19,643 (clicking) 5 00:00:19,643 --> 00:00:23,767 And files photos and files videos. 6 00:00:25,320 --> 00:00:28,800 And that should actually work. 7 00:00:28,800 --> 00:00:31,830 Oh no. Cannot create, cannot create, cannot create. 8 00:00:31,830 --> 00:00:32,663 Does that make sense? 9 00:00:32,663 --> 00:00:35,436 Of course, it makes sense, because we did not 10 00:00:35,436 --> 00:00:37,680 do any minus P. 11 00:00:37,680 --> 00:00:38,670 Now it works. 12 00:00:38,670 --> 00:00:40,560 And if I want to see what is inside, 13 00:00:40,560 --> 00:00:43,830 I can use LS minus R on files. 14 00:00:43,830 --> 00:00:47,940 And there, we can see the contents of these files. 15 00:00:47,940 --> 00:00:50,040 One command that we did not talk about but 16 00:00:50,040 --> 00:00:51,330 I can't help myself. 17 00:00:51,330 --> 00:00:53,543 And I want to show you anyway, is tree. 18 00:00:53,543 --> 00:00:57,150 "Tree", we'll show you a tree hierarchy and the tree 19 00:00:57,150 --> 00:01:00,759 command makes it easier to see what exactly is 20 00:01:00,759 --> 00:01:03,210 happening and where it is happening. 21 00:01:03,210 --> 00:01:05,760 So, that's one command to remind, I think. 22 00:01:05,760 --> 00:01:07,680 Next you want to copy all files that have a 23 00:01:07,680 --> 00:01:11,167 name starting with an A, B or C from ATC to TMP files. 24 00:01:11,167 --> 00:01:12,420 "How do we do that?" 25 00:01:12,420 --> 00:01:16,680 Well, CP slash ETC, and then you can choose 26 00:01:16,680 --> 00:01:21,300 either you open a square bracket, followed by A dash C 27 00:01:21,300 --> 00:01:26,300 or ABC star to, and where did we need to copy it to? 28 00:01:26,310 --> 00:01:28,890 We needed to copy it to files. 29 00:01:28,890 --> 00:01:31,380 And do remember, if your destination in 30 00:01:31,380 --> 00:01:35,520 copy is directory, better make sure you put slash 31 00:01:35,520 --> 00:01:38,400 behind it to avoid any confusion. 32 00:01:38,400 --> 00:01:40,809 We can safely ignore all the error messages, 33 00:01:40,809 --> 00:01:45,060 because that is not really important. 34 00:01:45,060 --> 00:01:47,340 What is important is that we can see a couple 35 00:01:47,340 --> 00:01:49,560 of files that have been created in the TMP 36 00:01:49,560 --> 00:01:50,643 files directory. 37 00:01:51,750 --> 00:01:55,290 Next, from TMP files move all files that have 38 00:01:55,290 --> 00:01:59,070 a name starting with A or B to TMP files photos. 39 00:01:59,070 --> 00:02:01,701 So MV, and I'm going to persist in using a relative 40 00:02:01,701 --> 00:02:03,420 pat name. 41 00:02:03,420 --> 00:02:08,420 So files AB star to photos, 42 00:02:08,880 --> 00:02:12,120 and ah, that's not going to work. 43 00:02:12,120 --> 00:02:17,120 That should be files slash photos, and that is doing better. 44 00:02:18,420 --> 00:02:21,870 And next we need to move all files with the name, 45 00:02:21,870 --> 00:02:25,350 starting with the C to TMP files videos. 46 00:02:25,350 --> 00:02:29,070 I can go for the lazy man solution here. 47 00:02:29,070 --> 00:02:30,000 What do I mean? 48 00:02:30,000 --> 00:02:33,425 Well, what I mean is that the only thing remaining is files 49 00:02:33,425 --> 00:02:36,270 with the name, starting with the C. 50 00:02:36,270 --> 00:02:40,047 So, I can use MV files. 51 00:02:40,047 --> 00:02:41,580 Ah, C star. 52 00:02:41,580 --> 00:02:44,814 I can also take out the C if I want to. 53 00:02:44,814 --> 00:02:46,680 Is it really going to work? 54 00:02:46,680 --> 00:02:49,530 Well, in this case the star is going to be 55 00:02:49,530 --> 00:02:51,450 interpreted as everything. 56 00:02:51,450 --> 00:02:54,300 And you'll notice that it's not going to work, 57 00:02:54,300 --> 00:02:57,810 because everything includes photos, pictures and videos. 58 00:02:57,810 --> 00:03:01,470 So, lazy man is fine, but not in this scenario. 59 00:03:01,470 --> 00:03:06,470 I'm going to move these files C to files slash videos. 60 00:03:08,310 --> 00:03:09,600 And there we go. 61 00:03:09,600 --> 00:03:11,078 Ah, We have removed it. 62 00:03:11,078 --> 00:03:14,627 Now once again, tree is a nice command to figure out 63 00:03:14,627 --> 00:03:17,730 the result and here we can see the result. 64 00:03:17,730 --> 00:03:20,970 And do you think we still need this directory structure? 65 00:03:20,970 --> 00:03:22,140 I don't think so. 66 00:03:22,140 --> 00:03:27,140 So RM minus RF files will remove everything and that's all.