1
00:00:01,910 --> 00:00:03,410
Hello everyone.

2
00:00:03,620 --> 00:00:08,950
In this lecture let's talk about command find.

3
00:00:09,020 --> 00:00:13,850
But before starting to show you some comments just check the mail first

4
00:00:18,780 --> 00:00:25,890
it is one of the biggest Menlo because find command is a very complex and have many possibilities how

5
00:00:25,890 --> 00:00:27,300
to use it.

6
00:00:27,390 --> 00:00:29,990
We will cover a just few of them.

7
00:00:30,660 --> 00:00:36,390
So when we want to find some file or directory we are starting with keyword.

8
00:00:36,510 --> 00:00:37,080
Find

9
00:00:40,460 --> 00:00:46,300
followed by starting point which is place from where the command should start searching.

10
00:00:46,310 --> 00:00:53,120
So I will use directory home and now I need to specify name or file or directory which I would like

11
00:00:53,120 --> 00:00:53,690
to find.

12
00:00:53,690 --> 00:01:00,690
So I am using Desh name space and name of a file or directory let's say config.

13
00:01:00,740 --> 00:01:05,470
We have created in last lecture after executing this command.

14
00:01:05,480 --> 00:01:06,920
I see three findings.

15
00:01:06,920 --> 00:01:09,380
I have three config files.

16
00:01:09,380 --> 00:01:19,610
We can specify to find command what type should it search for when we specify type with parameter f

17
00:01:25,260 --> 00:01:33,650
it will search only for files and when on the other hand we use Type D.

18
00:01:36,350 --> 00:01:39,470
It will search for directories with the name config.

19
00:01:40,220 --> 00:01:51,420
And we see that no conflict directory was found under my home directory we can find command use wildcards.

20
00:01:51,480 --> 00:01:53,740
Please be Don't afraid now about it.

21
00:01:53,750 --> 00:02:02,850
We will cover it lately but for now I can try to find all s h files under starting point.

22
00:02:02,880 --> 00:02:03,930
Home returned

23
00:02:06,600 --> 00:02:18,680
and that name asterisk dot S H represents all s h files let's say that I want to search only for files.

24
00:02:18,970 --> 00:02:22,420
So we need to specify type F

25
00:02:26,000 --> 00:02:30,510
so I see that I have a lot of files with ext dot s h

26
00:02:34,080 --> 00:02:42,360
so let's make something more interesting with it it please note that find didn't search only in specified

27
00:02:42,390 --> 00:02:46,650
directory but also in its sub directories and so on.

28
00:02:51,260 --> 00:02:54,990
So now we can tell.

29
00:02:55,570 --> 00:02:56,560
To find common.

30
00:02:56,620 --> 00:02:59,800
To search only in starting point directory.

31
00:02:59,800 --> 00:03:07,540
Using parameter Maxim then followed by number one.

32
00:03:07,540 --> 00:03:15,590
This will ensure that find will search for as far as h files only inside home Richard directory and

33
00:03:15,590 --> 00:03:16,420
run around it.

34
00:03:16,420 --> 00:03:18,150
I can only see two files.

35
00:03:18,220 --> 00:03:23,070
That means that in home Richard are only two files of an extension.

36
00:03:23,230 --> 00:03:35,980
As H good I can now edit max depth parameter to number two and I see debt find common.

37
00:03:36,050 --> 00:03:45,890
Found more files with max depth set to 3 which means search also in sub directories of sub directories.

38
00:03:45,890 --> 00:03:49,410
I have much more findings as find.

39
00:03:49,410 --> 00:03:51,020
Command is really complex.

40
00:03:51,020 --> 00:04:01,560
I can search only for files which were modified more than 50 days ago using M time parameter.

41
00:04:02,120 --> 00:04:12,170
So at the end I can add another parameter M time and specify plus 50 v means search also on.

42
00:04:12,290 --> 00:04:14,710
Sorry search only for files.

43
00:04:15,480 --> 00:04:21,870
V2 are modified more than 50 days ago and it's quite a lot.

44
00:04:21,870 --> 00:04:30,960
If I change M time to only 50 without plus symbol final search for files modified 50 days ago no file

45
00:04:30,960 --> 00:04:31,560
was found.

46
00:04:31,560 --> 00:04:39,470
In my case and similarly when using minus symbol fine will search for files modified less than 50 days.

47
00:04:39,490 --> 00:04:49,860
In my case only 3 files similar parameter S M time is a time it represents when the file was access

48
00:04:54,690 --> 00:05:03,720
now let's use another other parameter for searching and it is a parameter called size.

49
00:05:03,890 --> 00:05:16,520
For example let's say search inside my home directory search for files only so find 0 Richard which

50
00:05:16,520 --> 00:05:25,950
is my home directory or I can use Tilde symbol to represent my home right at 3.

51
00:05:26,540 --> 00:05:38,360
Search for files only that means type is F and use parameter size and search for files bigger than 5

52
00:05:38,360 --> 00:05:42,550
megabytes few files in my home directory.

53
00:05:42,560 --> 00:05:46,810
Var found good.

54
00:05:46,940 --> 00:05:49,930
This was short summary about find command.

55
00:05:50,000 --> 00:05:51,340
What can you do with it.

56
00:05:51,350 --> 00:05:52,640
How to use it.

57
00:05:52,850 --> 00:06:00,800
And maybe if you haven't used to find command before you might feel kind of lost as so many parameters

58
00:06:00,800 --> 00:06:03,310
are there but don't be afraid.

59
00:06:03,320 --> 00:06:10,370
Practice make it better and after you finish this scores and start making your own scripts you will

60
00:06:10,370 --> 00:06:12,230
find the find.

61
00:06:12,230 --> 00:06:13,430
Come on not so hard.

62
00:06:13,430 --> 00:06:13,910
Tools.
