1 00:00:00,450 --> 00:00:03,660 Right now, it's time to talk about how to find a specific. 2 00:00:04,070 --> 00:00:09,180 OK, so in this lecture we will do two commands, the command and rooked command. 3 00:00:09,240 --> 00:00:11,090 OK, now let's start with the command. 4 00:00:11,100 --> 00:00:12,460 So let's have a look here. 5 00:00:12,720 --> 00:00:16,590 So let's make this text file, which is the text. 6 00:00:16,890 --> 00:00:18,980 It's used in the text command, that command. 7 00:00:19,200 --> 00:00:21,160 It would create a text file for you. 8 00:00:21,480 --> 00:00:23,030 So here you go. 9 00:00:23,790 --> 00:00:28,130 And it's got whatever value it took in the embedded and use the direction. 10 00:00:28,140 --> 00:00:28,650 Don't worry. 11 00:00:28,650 --> 00:00:30,690 We will talk about these later on. 12 00:00:30,870 --> 00:00:31,880 No worries for now. 13 00:00:32,280 --> 00:00:34,860 So echo this and put it inside the text. 14 00:00:35,190 --> 00:00:37,200 OK, let's clear the screen and have. 15 00:00:37,790 --> 00:00:39,860 So it is it will be more clean. 16 00:00:40,230 --> 00:00:42,710 No, I will use the paint command. 17 00:00:43,020 --> 00:00:51,070 No, I want to search in the current directory which is not or where I want to search for this fight. 18 00:00:51,330 --> 00:00:56,220 So for example slash which means root or slash home OK. 19 00:00:56,400 --> 00:00:56,920 Or whatever. 20 00:00:57,170 --> 00:00:57,510 Fine. 21 00:00:57,690 --> 00:00:58,980 But here the absolute best. 22 00:00:59,190 --> 00:01:02,370 OK, or that which is the current path. 23 00:01:02,760 --> 00:01:06,670 And this means that find not dash name. 24 00:01:07,080 --> 00:01:10,770 So this is the name of the fight which is near the text. 25 00:01:10,950 --> 00:01:13,310 And it's pretty interesting that you can see that. 26 00:01:13,320 --> 00:01:17,340 Yeah, we found it and this is the back for it, which is dot slash. 27 00:01:18,270 --> 00:01:23,100 The dot means the current directory which is about which is home. 28 00:01:23,100 --> 00:01:24,210 Oberto OK. 29 00:01:25,330 --> 00:01:33,390 Now, if I found or if I would be, but this time that is capital, you can see we cannot find it right. 30 00:01:33,880 --> 00:01:41,350 So to to do such a thing or to remove such a thing, we would use the I mean, that's I am not that 31 00:01:41,350 --> 00:01:43,050 name, which means ignore the case. 32 00:01:43,390 --> 00:01:44,550 So if I type here. 33 00:01:44,560 --> 00:01:45,040 Yeah. 34 00:01:45,040 --> 00:01:47,800 We found did we ignore as you can see. 35 00:01:48,070 --> 00:01:49,480 Which means ignore the case. 36 00:01:49,990 --> 00:01:50,940 So far so good. 37 00:01:51,550 --> 00:01:51,810 No. 38 00:01:51,970 --> 00:01:55,610 What if I want to do specific things with this command. 39 00:01:55,630 --> 00:01:56,580 OK, sorry. 40 00:01:56,590 --> 00:01:58,080 With this file that we found. 41 00:01:58,450 --> 00:02:05,620 So for example the output that's less which means different the output as a list format. 42 00:02:05,620 --> 00:02:08,860 But by the way, this is the NSA, which is from the find. 43 00:02:09,180 --> 00:02:15,860 This is not the system unless I think under the hood they use the alias, but they add a specific things 44 00:02:15,860 --> 00:02:18,890 that appear like this one, all this things, whatever. 45 00:02:19,230 --> 00:02:24,150 OK, now what if I want to execute command after I found this file? 46 00:02:24,190 --> 00:02:29,040 So for example, I am searching for temporary fight and this because I want to delete them. 47 00:02:29,230 --> 00:02:30,220 So I have to do that. 48 00:02:30,520 --> 00:02:32,460 I will use that option. 49 00:02:32,740 --> 00:02:36,340 So Desh exec and but whatever option you want. 50 00:02:36,340 --> 00:02:43,060 So unless Stachel for example, this is the commands I want to execute and don't forget we put them 51 00:02:43,300 --> 00:02:47,650 that Brace's here or the curly brackets, the backslash dot. 52 00:02:47,890 --> 00:02:50,350 OK, and you can see that. 53 00:02:50,350 --> 00:02:51,250 Yeah, we found it. 54 00:02:52,030 --> 00:02:52,840 This is the file. 55 00:02:53,840 --> 00:02:57,680 And the razmi defined the user, the group that permission and whatever. 56 00:02:57,710 --> 00:03:04,040 OK, so actually we execute the command for this file that we found or these fights that we found. 57 00:03:04,300 --> 00:03:10,330 OK, so for example, so let's have t one text. 58 00:03:10,720 --> 00:03:15,450 OK, it is clear to one, T two to three. 59 00:03:16,070 --> 00:03:18,320 OK, and if I found it again. 60 00:03:19,730 --> 00:03:20,120 Here. 61 00:03:21,610 --> 00:03:27,160 Ignore the case, we only find one, of course, because we are using the tactics. 62 00:03:27,350 --> 00:03:34,240 Now, what if I typed instead of the text that wild card or the arrest shift eight? 63 00:03:34,480 --> 00:03:42,460 So like this you can see that we have found one, two, three, four, or that takes all of them have 64 00:03:42,460 --> 00:03:43,010 been found. 65 00:03:43,030 --> 00:03:47,740 OK, because star means everything, everything possible, which is the wild. 66 00:03:48,460 --> 00:03:51,970 Well, I'm assuming that you are familiar with that anyway. 67 00:03:52,150 --> 00:03:57,160 So let's clear the screen and let's see what we have. 68 00:03:57,340 --> 00:04:00,760 So, for example, these are temporary files in the system. 69 00:04:00,760 --> 00:04:04,240 Look, find, for example, or system errors or something. 70 00:04:04,540 --> 00:04:05,380 I did need them. 71 00:04:06,010 --> 00:04:12,810 For example, I want to archive them and we already have a process archiving that, but I want to delete 72 00:04:12,820 --> 00:04:18,460 it when I'm just assuming this is the case, by the way, or if that can be handled by the current job, 73 00:04:18,460 --> 00:04:20,620 you can you don't need to do that manually. 74 00:04:20,630 --> 00:04:24,160 Actually, this is something automated can be done or jenkins' or whatever. 75 00:04:24,760 --> 00:04:26,950 But anyway, don't worry about the jobs, by the way. 76 00:04:26,950 --> 00:04:27,910 We will talk about it. 77 00:04:28,210 --> 00:04:35,020 I want to find that Dashi name and the name is Twista, which is anything. 78 00:04:35,530 --> 00:04:41,710 And I want to execute this command, execute this command and this command this time would be up and 79 00:04:42,160 --> 00:04:46,960 up and with the curly brackets, Slashdot again, like this. 80 00:04:47,110 --> 00:04:48,220 So if I type this. 81 00:04:50,060 --> 00:04:54,850 So maybe I forgot something, so, yeah, it will be like this in time like this. 82 00:04:55,130 --> 00:04:56,060 Yeah, yeah. 83 00:04:56,810 --> 00:04:58,100 Did you know why this happened? 84 00:04:58,250 --> 00:05:05,420 So actually let's have this time and see why this happening, because you can see that there is something 85 00:05:05,420 --> 00:05:05,780 here. 86 00:05:05,790 --> 00:05:10,070 You know, the case is here to get capital this time. 87 00:05:10,340 --> 00:05:11,270 So you can see that. 88 00:05:11,270 --> 00:05:14,530 The thing is the problem is with the Kessman. 89 00:05:14,540 --> 00:05:22,040 So if I type Dashi name, I need to provide the T as a capital or the letters as a capital, which means 90 00:05:22,040 --> 00:05:23,210 either capital or small. 91 00:05:23,310 --> 00:05:25,010 OK, this is how find command work. 92 00:05:25,080 --> 00:05:26,830 OK, so it's clear. 93 00:05:26,840 --> 00:05:27,980 And let's have another look. 94 00:05:28,220 --> 00:05:29,660 This time I want to remove. 95 00:05:29,660 --> 00:05:30,170 All right. 96 00:05:30,380 --> 00:05:31,760 So our under-sheriff. 97 00:05:31,970 --> 00:05:33,020 So let's have a look. 98 00:05:34,020 --> 00:05:36,250 You can see that there is something here. 99 00:05:36,480 --> 00:05:42,570 Yeah, we already did that, but if you notice here, while we are searching, we looked for this and 100 00:05:42,570 --> 00:05:43,650 this and this and this. 101 00:05:43,800 --> 00:05:45,890 But we find this, which is total zero. 102 00:05:46,260 --> 00:05:49,610 So we do not need so that we consider to be not found. 103 00:05:49,620 --> 00:05:56,600 So we can see that the gas to temp or something or dirty or whatever it considered to be, not anywhere. 104 00:05:56,880 --> 00:06:02,520 You can see that we already deleted deleted, we already deleted the files and everything worked correctly. 105 00:06:02,750 --> 00:06:04,410 Now the other command, which is delicate. 106 00:06:04,470 --> 00:06:07,320 OK, so let's have another fight, which is the again. 107 00:06:09,440 --> 00:06:17,060 And I am sorry about this, so and I will copy this file and put it inside the temp directory, but 108 00:06:17,060 --> 00:06:22,940 again, don't worry about the copy command, the command, renaming the files, names or wherever, 109 00:06:22,940 --> 00:06:26,000 or if that would be handled in the next lecture. 110 00:06:26,450 --> 00:06:32,480 But don't worry, so far now for me, copy from source to destination and I will nemati the text or 111 00:06:32,990 --> 00:06:34,860 as is anticipated there. 112 00:06:35,090 --> 00:06:39,230 So if I type the command to the text. 113 00:06:40,170 --> 00:06:46,380 You can see that it will start looking for anything fixed, so here is the text, whatever something, 114 00:06:46,710 --> 00:06:53,630 and you can see that if I look here, you don't know or there are nothing called t the text. 115 00:06:54,990 --> 00:06:55,400 OK. 116 00:06:56,570 --> 00:07:03,590 So I need to provide another command and this command code update DB, so this is to update the database 117 00:07:03,590 --> 00:07:05,810 for the OK to be working so pseudo. 118 00:07:07,660 --> 00:07:14,550 For the thing, and yet you can see that we already updated that and now it's time for running the humanity 119 00:07:14,560 --> 00:07:15,090 to text. 120 00:07:16,170 --> 00:07:22,640 And you can see that this time, yeah, we found it so you can see that it is here at the home of Untoasted 121 00:07:22,650 --> 00:07:26,390 26th, but by the way, we can't find it in the temporary. 122 00:07:27,120 --> 00:07:30,930 Maybe he didn't have access there or I don't know, after. 123 00:07:31,290 --> 00:07:35,060 But anyway, we have it here and everything is working as expected. 124 00:07:35,340 --> 00:07:36,300 Or thanks for what?