1
00:00:04,470 --> 00:00:09,130
We have just talked about the sorting of the files in the output of Alaska amount.

2
00:00:09,600 --> 00:00:15,180
And now you know how to sort files, for example, by file size in ascending or descending order.

3
00:00:15,700 --> 00:00:20,280
Sought by modification date or how to sort by files extension?

4
00:00:20,850 --> 00:00:22,140
No, let me explain.

5
00:00:22,270 --> 00:00:24,180
And also due a cold sort.

6
00:00:24,570 --> 00:00:29,460
And with this ability, you are able easily sort contents of specific files.

7
00:00:30,000 --> 00:00:32,340
And first, let's create simple file.

8
00:00:32,369 --> 00:00:38,100
And I'll agree that using Coonana Ed they are not and left school file animals don't dig deep.

9
00:00:38,340 --> 00:00:42,670
And here, let's play some animal names to get a dog up.

10
00:00:43,020 --> 00:00:43,710
Elephant.

11
00:00:44,570 --> 00:00:45,310
Monarchism.

12
00:00:46,170 --> 00:00:49,240
And let's say they are like, so let's save the file.

13
00:00:49,240 --> 00:00:49,960
The control exit.

14
00:00:50,180 --> 00:00:50,600
Yes.

15
00:00:50,670 --> 00:00:51,600
And press enter.

16
00:00:51,840 --> 00:00:55,700
And now this file should be present here in rocking directory for this user.

17
00:00:56,130 --> 00:00:57,450
All right, let's exit.

18
00:00:57,490 --> 00:01:03,510
And now let's use sort of tilted board to first to let me and or sort with option help.

19
00:01:03,870 --> 00:01:09,120
And here, well, it's a scroll up and you'll see actually a description of what this will do.

20
00:01:09,670 --> 00:01:17,070
It will sort concatenation of a file or files and result of the sorting will be printed to standout

21
00:01:17,160 --> 00:01:17,640
output.

22
00:01:17,910 --> 00:01:20,970
It means that the file itself will be modified.

23
00:01:21,360 --> 00:01:27,750
But of course, there was an option that allows you to create the file and start there, a result of

24
00:01:27,810 --> 00:01:28,910
sorting cooperation.

25
00:01:29,100 --> 00:01:30,610
Here was this option desk.

26
00:01:30,740 --> 00:01:30,990
Oh.

27
00:01:32,130 --> 00:01:38,560
Also, using other options, you are able to sort the numbers, for example, or to apply rivalrous

28
00:01:38,700 --> 00:01:39,050
sort.

29
00:01:39,600 --> 00:01:39,990
All right.

30
00:01:40,200 --> 00:01:46,780
Let's first try to sort the contours of animals, batiks, defile, sort animals, the tax deal.

31
00:01:47,180 --> 00:01:54,090
And now I see that the old lines in these animals batiks defile way are sorted in alphabetical order.

32
00:01:54,470 --> 00:01:55,470
First garms bureau.

33
00:01:55,530 --> 00:01:57,060
Then the cat dog and so on.

34
00:01:58,170 --> 00:02:00,510
Let's apply or over a certain sort.

35
00:02:00,710 --> 00:02:03,750
Desh are like so and no.

36
00:02:03,780 --> 00:02:07,170
I see that the alliance where I bring in rivalrous order.

37
00:02:08,130 --> 00:02:13,500
Let's now say result of the sorting into the file using Desh or option.

38
00:02:13,860 --> 00:02:18,330
And here will be a file sorted dot the extreme like so.

39
00:02:19,190 --> 00:02:22,830
And now let's have a look at contours of sort of the text file.

40
00:02:23,070 --> 00:02:26,910
And in this file I'll see the same result as they have seen here.

41
00:02:27,600 --> 00:02:33,360
And of course, file any multiple D initial file remains here unchanged.

42
00:02:34,540 --> 00:02:37,790
That's how it is possible to sort goondas of specific file.

43
00:02:38,080 --> 00:02:42,040
But no, let's create the file that will contain some numbers.

44
00:02:42,740 --> 00:02:46,860
Let's use again, narrow editorial numbers to door DST.

45
00:02:47,560 --> 00:02:50,470
And here, let's add some numbers like so.

46
00:02:51,930 --> 00:02:58,860
Some large number, small number, something girls like, so and let's save the file.

47
00:02:58,920 --> 00:02:59,400
Yes.

48
00:02:59,550 --> 00:03:00,150
And right.

49
00:03:00,150 --> 00:03:00,620
Condon's.

50
00:03:00,990 --> 00:03:01,440
All right.

51
00:03:01,680 --> 00:03:03,370
Let's use again sort of command.

52
00:03:03,510 --> 00:03:06,750
And the here will be nonbiased of the 60 file as argument.

53
00:03:07,110 --> 00:03:09,420
And here I see a result of sorting.

54
00:03:10,200 --> 00:03:12,900
And that's probably not what you have expected from.

55
00:03:12,990 --> 00:03:15,390
So desperation applied to numbers.

56
00:03:15,960 --> 00:03:22,410
And the reason for such a result is that sort of Bly's actually sorting do characters, not numbers

57
00:03:22,440 --> 00:03:25,830
by default, but using desch and option.

58
00:03:27,070 --> 00:03:34,150
Like this, you are able to apply certain numbers and note you see correctly sort of Lombroso starting

59
00:03:34,150 --> 00:03:37,450
from smallest and and with the largest one.

60
00:03:38,260 --> 00:03:44,560
And also same as with the strings, you are able to bring a result of this sort in into the file.

61
00:03:44,860 --> 00:03:46,430
This all sorted.

62
00:03:46,450 --> 00:03:51,930
The numbers dot the 60 and no, I see that sort of numbers.

63
00:03:51,990 --> 00:03:55,330
But they do file was created here in working directory.

64
00:03:55,660 --> 00:03:57,370
Let's have a look at the contents of this file.

65
00:03:57,580 --> 00:04:01,630
And yes, here I see sort of the numbers starting from the smallest one.

66
00:04:01,780 --> 00:04:03,100
Same result as here.

67
00:04:03,970 --> 00:04:06,220
And notice that there was this option in place.

68
00:04:06,280 --> 00:04:13,030
This all you simply sent is to the out data stream from sort of process, not to terminal.

69
00:04:13,300 --> 00:04:18,760
It is default actually action, but instead to the file sort of Nomura's boutiques in this case.

70
00:04:19,279 --> 00:04:25,630
But of course, you are always able to use such syntax, sort of this and Lombroso to dig deep here

71
00:04:25,630 --> 00:04:30,310
will be greater than the sign that stands for redirection of the out specific file.

72
00:04:30,550 --> 00:04:32,470
And here will be a file name.

73
00:04:32,770 --> 00:04:36,040
And let's simply use file name, sort of dot the 60.

74
00:04:36,390 --> 00:04:38,780
And the result will be actually the same card.

75
00:04:38,860 --> 00:04:40,080
So that takes time.

76
00:04:41,050 --> 00:04:45,950
And now I see here same contents as in an ARS or file sorted numbers.

77
00:04:46,020 --> 00:04:46,730
Dodig still.

78
00:04:47,440 --> 00:04:47,830
All right.

79
00:04:48,190 --> 00:04:53,710
This is how you could sort numbers in the file altered as possible to leave only unique values.

80
00:04:53,950 --> 00:04:54,620
Let me show you that.

81
00:04:54,760 --> 00:04:56,220
Let me clear terminal end here.

82
00:04:56,230 --> 00:04:57,060
Type, sort.

83
00:04:57,100 --> 00:04:57,940
This does help.

84
00:04:58,180 --> 00:05:02,410
And here will be a pipe grab, but unique like so.

85
00:05:03,060 --> 00:05:06,640
And you see that using this you or that unique option.

86
00:05:06,910 --> 00:05:11,470
You could leave only unique values in the resulting output.

87
00:05:12,100 --> 00:05:13,810
Let's actually modify numbers.

88
00:05:13,840 --> 00:05:15,100
The text file a bit.

89
00:05:15,160 --> 00:05:17,190
Na'ama numbers about the 60.

90
00:05:17,470 --> 00:05:22,900
And here, let's add the same number, 24 as bureaus here and here.

91
00:05:22,930 --> 00:05:25,630
Let's add somewhere number two like this.

92
00:05:26,020 --> 00:05:27,280
Let's save the file.

93
00:05:27,430 --> 00:05:27,890
Yes.

94
00:05:28,360 --> 00:05:33,680
And if I'll simply sought it without this option, like sort this end.

95
00:05:33,780 --> 00:05:35,630
And here will be numbers in the text.

96
00:05:36,010 --> 00:05:39,130
I'll see it two times two and two times twenty four.

97
00:05:39,550 --> 00:05:41,980
But if I'll add the here additional option.

98
00:05:42,070 --> 00:05:43,600
Desh, you like this.

99
00:05:43,890 --> 00:05:44,650
I'll see that.

100
00:05:44,680 --> 00:05:45,550
Do I bureaus.

101
00:05:45,600 --> 00:05:46,220
Only once.

102
00:05:46,390 --> 00:05:47,840
Same as 24.

103
00:05:48,850 --> 00:05:54,550
Also you are able to additionally add here our other option if you want, but put salt in descending

104
00:05:54,640 --> 00:05:55,000
order.

105
00:05:55,660 --> 00:05:56,050
All right.

106
00:05:56,300 --> 00:05:59,310
That's all what I wanted to tell you about the sort command.

107
00:05:59,560 --> 00:06:03,580
It allows you to easily salt content of specific Deakes defiles.

108
00:06:03,880 --> 00:06:08,290
And by default, this command print result by the out to terminal.

109
00:06:08,750 --> 00:06:12,430
What of course, you are able to bring the result to some Özal file.

110
00:06:13,020 --> 00:06:13,990
That's all for this lecture.

111
00:06:14,060 --> 00:06:21,250
And the next one, I'll start talking about permissions of the files and creation of additional users.

112
00:06:21,520 --> 00:06:22,660
Let's talk about it next.

113
00:06:22,830 --> 00:06:23,130
My.

