1 00:00:00,970 --> 00:00:08,270 Compressing and archiving hecklers often need to download and install new software, as well as send 2 00:00:08,290 --> 00:00:11,050 and download multiple scripts and the large files. 3 00:00:11,860 --> 00:00:18,100 These tasks are easier if they these files are compressed and combined into a single file. 4 00:00:18,520 --> 00:00:24,940 If you come from the Windows Phone, you'll probably recognize the concepts concept from the zip format, 5 00:00:25,690 --> 00:00:32,200 which combines and compresses files to the to make them similar for transferring over the internet or 6 00:00:32,200 --> 00:00:33,220 removable media. 7 00:00:33,730 --> 00:00:40,330 So there are many ways to do this in Linux, and we look at five of the most common tools for doing 8 00:00:40,660 --> 00:00:41,770 so in this nature. 9 00:00:42,340 --> 00:00:49,510 So we'll also look at the deeded command, which allows you to copy entire drives, including collected 10 00:00:49,510 --> 00:00:53,500 files onto its drivers, natural drives and drivers. 11 00:00:54,070 --> 00:00:55,510 So what is compression? 12 00:00:56,050 --> 00:01:00,850 So the interesting subject of compression called feel an entire course by itself. 13 00:01:01,180 --> 00:01:05,470 But for this course, you only need a rudimentary understanding of the process. 14 00:01:06,460 --> 00:01:13,300 The compression, as the name implies, makes data smaller, thereby requiring less storage capacity 15 00:01:13,300 --> 00:01:18,430 and making the data easier to transmit for your purposes as beginning kicker. 16 00:01:18,520 --> 00:01:24,520 It was selfish to categorize compression as a either loosey or lossless. 17 00:01:24,910 --> 00:01:32,170 So loosely compression is very effective in reducing the size of files, but the integrity of the information 18 00:01:32,170 --> 00:01:32,710 is lost. 19 00:01:33,130 --> 00:01:37,720 So in other words, the file after compression is not exactly the same as the original. 20 00:01:38,170 --> 00:01:45,520 So this type of compression works great for graphics, video and audio files, where a small difference 21 00:01:45,520 --> 00:01:56,530 in the files hardly noticeable like an input three in before and and jpg AGP age are also all loosely 22 00:01:56,530 --> 00:01:58,900 compression compression algorithms. 23 00:01:59,560 --> 00:02:07,960 So if a pixel in a pinned file or a single note in a puppetry file is changed, your E or EHR is likely 24 00:02:07,960 --> 00:02:08,980 to notice a difference. 25 00:02:09,740 --> 00:02:17,320 Of course, music efficiencies will say that they can definitely tell the difference between an empathy 26 00:02:17,320 --> 00:02:19,710 and uncompressed FLAC file. 27 00:02:20,200 --> 00:02:26,470 So this strength of losing commercials, ah um, its efficiency and effectiveness. 28 00:02:26,470 --> 00:02:29,020 But the compression radio is very high. 29 00:02:29,050 --> 00:02:34,600 The meaning that the uh, resulting file is significantly smaller than the original. 30 00:02:35,080 --> 00:02:42,450 However, elusive compression is unacceptable when you are sending files or software and data integrity 31 00:02:42,460 --> 00:02:42,970 support. 32 00:02:43,300 --> 00:02:48,820 For example, if you're sending a script or a document, the integrity of the original file must be 33 00:02:48,820 --> 00:02:50,740 retained when it is compressed. 34 00:02:51,190 --> 00:02:56,980 So this letter focused on the lossless type of compression, which is available for a number of utilities 35 00:02:56,980 --> 00:02:57,850 and algorithms. 36 00:02:58,330 --> 00:03:05,140 Unfortunately, this compression is not as efficient as oluchi compression as you might imagine. 37 00:03:05,170 --> 00:03:11,290 Uh, for but for D.A. integrity is often far more important than the compression ratio. 38 00:03:12,940 --> 00:03:14,700 To bring us together. 39 00:03:16,330 --> 00:03:24,340 So usually the first thing you do when competition crawls is to combine them into an archive. 40 00:03:24,520 --> 00:03:30,630 In most cases when archiving files, you will use a task command here. 41 00:03:31,750 --> 00:03:32,260 So. 42 00:03:36,110 --> 00:03:39,320 And it's open here, so you will use TerraCom month. 43 00:03:39,530 --> 00:03:42,380 So Tash stands at heart here. 44 00:03:42,590 --> 00:03:46,660 So Tash stands save Archi here. 45 00:03:47,630 --> 00:03:48,200 So. 46 00:03:49,350 --> 00:03:55,810 A reference for the prehistoric days of computing, when systems used tape to store data is mysterious. 47 00:03:56,230 --> 00:04:03,800 So the Turkoman creates a single file from many files, which is then referred to as an archive terrifying 48 00:04:03,820 --> 00:04:04,930 or terrible. 49 00:04:05,620 --> 00:04:12,160 For instance, you say you had three scripts files like the here, for example. 50 00:04:12,760 --> 00:04:13,300 Um? 51 00:04:15,520 --> 00:04:16,700 Torch here. 52 00:04:19,010 --> 00:04:19,860 How chair. 53 00:04:22,250 --> 00:04:34,010 For example, pick beans, one that see her share pouch, take beans, one tool that python here take 54 00:04:34,490 --> 00:04:36,680 and actually touch. 55 00:04:37,370 --> 00:04:43,010 Take beans at three that year, for example out you. 56 00:04:45,670 --> 00:04:48,360 As you can see, we files, but they are important for us. 57 00:04:49,530 --> 00:04:49,920 So. 58 00:04:51,760 --> 00:04:59,230 If you never get a director that holds them know and perform and a long listing, you can clearly see 59 00:04:59,230 --> 00:05:05,470 the files and details you'd expect so including the size of the files here, as you can see here. 60 00:05:08,480 --> 00:05:09,560 It was a. 61 00:05:11,130 --> 00:05:16,890 You know, actually, you know, this is a page, so as you can see, we've created three four and it's 62 00:05:16,890 --> 00:05:25,230 actually copied them to folders here and this change it with our text editor. 63 00:05:25,890 --> 00:05:29,930 Actually, it's, uh, example here. 64 00:05:30,610 --> 00:05:35,910 And let's cope with this here and here. 65 00:05:35,940 --> 00:05:39,050 It's open here and then, uh, put inside them themselves. 66 00:05:39,450 --> 00:05:43,260 Something here, uh, just an example. 67 00:05:43,270 --> 00:05:45,420 See hash file here. 68 00:05:47,750 --> 00:05:50,520 Here, as you can see, we creative loving it. 69 00:05:53,020 --> 00:05:53,380 Here. 70 00:05:54,830 --> 00:05:56,900 And let's open this as well. 71 00:05:57,140 --> 00:05:57,710 Um. 72 00:05:59,060 --> 00:06:01,250 Uh, my phone. 73 00:06:01,490 --> 00:06:02,540 Wow, here. 74 00:06:05,060 --> 00:06:05,510 Here. 75 00:06:13,870 --> 00:06:26,120 So you can see here and let's open here and, uh, just start out while some clients use this or say, 76 00:06:26,960 --> 00:06:34,850 uh, compliant comp. See scripts here or programs their homes their. 77 00:06:44,840 --> 00:06:45,060 Yeah. 78 00:06:46,250 --> 00:06:47,480 It's uh. 79 00:06:49,200 --> 00:06:55,680 As you can see here, we have a new example find here. 80 00:06:56,100 --> 00:06:58,080 So I see the example here. 81 00:06:59,110 --> 00:07:04,270 And less and less in here, as you can see here, there is a different ones. 82 00:07:04,930 --> 00:07:12,610 So let's say you want to send all three of these files to another hacker you are working with on a project 83 00:07:13,090 --> 00:07:23,790 so you can combine them and create a single shot archive file using Takam month here to see who we have. 84 00:07:24,410 --> 00:07:29,980 So we are entering the name of our file here. 85 00:07:30,280 --> 00:07:37,630 Take this project that tower here and we are assigning our files here without coming here. 86 00:07:38,020 --> 00:07:40,150 So no first come here. 87 00:07:40,390 --> 00:07:41,380 Take me one. 88 00:07:41,380 --> 00:07:49,180 See how much take means three out here and take bins to Python here. 89 00:07:55,170 --> 00:07:59,460 As you can see here, we compiled we create a tar file. 90 00:07:59,730 --> 00:08:03,750 So let's break down this command to a better understanding. 91 00:08:04,440 --> 00:08:11,360 So the archiving command is a task and we are using it here with three options, as you can see here. 92 00:08:12,860 --> 00:08:13,280 So. 93 00:08:15,730 --> 00:08:26,320 The sea option here means Crete v Um, which stands for rebels and is optional, you can. 94 00:08:26,770 --> 00:08:36,130 It's not mandatory here, so it's for outputting these files, which is created in tar files and if. 95 00:08:36,130 --> 00:08:37,120 Com month here. 96 00:08:38,480 --> 00:08:41,690 Um, means write the following file here. 97 00:08:43,640 --> 00:08:47,210 So they're the last option will also work for reading from files. 98 00:08:47,440 --> 00:08:54,980 And then we give the new archive the time the file name you want to create from three scripts here. 99 00:08:54,980 --> 00:09:00,500 As you can see here, we named it the take bins project here Tosh. 100 00:09:01,160 --> 00:09:11,240 Of course, in the fall, this command will take all three files here and create a single file so he 101 00:09:11,240 --> 00:09:15,590 can hear bins predictions project tar out of them. 102 00:09:15,590 --> 00:09:22,640 So when you do another long listing of the directory, you will see that it also contains a neutron 103 00:09:22,640 --> 00:09:23,350 file here. 104 00:09:24,910 --> 00:09:25,870 So you can see here. 105 00:09:27,060 --> 00:09:30,330 So not the size of the tar ball is here. 106 00:09:30,780 --> 00:09:32,520 Uh, thirteen. 107 00:09:32,730 --> 00:09:36,600 Uh, three nine three nine nine three eight six zero here. 108 00:09:37,410 --> 00:09:37,920 So. 109 00:09:39,300 --> 00:09:43,850 When the three of us are archived 30 years of significant overhead to perform this operation. 110 00:09:44,210 --> 00:09:50,120 Whereas a sum of us before archiving careless, calculated, uh, calculated. 111 00:09:52,010 --> 00:09:55,520 Here, so we will calculate this train was here. 112 00:09:56,000 --> 00:09:57,290 Uh, let's see it. 113 00:09:59,390 --> 00:10:00,800 The first take this one. 114 00:10:02,390 --> 00:10:04,700 See how Shear Plus. 115 00:10:06,920 --> 00:10:12,050 Uh, three one, it makes three here plus. 116 00:10:13,150 --> 00:10:18,100 Lastly, is around five, three, five seven. 117 00:10:19,300 --> 00:10:19,960 Three. 118 00:10:21,520 --> 00:10:22,810 Zero four. 119 00:10:24,240 --> 00:10:31,410 As you can see here, our time for is three, nine, three nine, four six here. 120 00:10:31,950 --> 00:10:40,530 So but in here three nine three three nine nine three six zero so this tarball, uh, here actually. 121 00:10:40,950 --> 00:10:47,310 So this is a greater than so this is greater than our total of some of this fires. 122 00:10:48,330 --> 00:10:48,750 So. 123 00:10:50,230 --> 00:10:54,580 In other words, the archiving process has added almost. 124 00:10:59,170 --> 00:11:01,270 Well, it's minus here. 125 00:11:02,880 --> 00:11:03,190 Or. 126 00:11:06,090 --> 00:11:06,510 Here. 127 00:11:09,110 --> 00:11:09,830 Minus. 128 00:11:11,120 --> 00:11:14,510 Uh, three, nine, nine, three, six zero here. 129 00:11:15,350 --> 00:11:22,460 So as you can see in the process is on the almost, uh, five thousand four hundred, uh, fourteen 130 00:11:22,790 --> 00:11:23,660 by storing it. 131 00:11:24,350 --> 00:11:30,290 So out of this horrid canvassing inefficient with small files, it becomes less and less significant 132 00:11:30,290 --> 00:11:32,870 with a larger and larger fires. 133 00:11:33,170 --> 00:11:33,650 So we can. 134 00:11:33,650 --> 00:11:40,070 This will reduce fires from the tarball without extracting them by using the tower command within them 135 00:11:40,860 --> 00:11:42,190 to on the list. 136 00:11:42,760 --> 00:11:49,640 Switch here Taj T we fear here and take things project here. 137 00:11:50,150 --> 00:11:52,100 Actually, let's see how many minutes we have. 138 00:11:52,100 --> 00:11:52,330 Yes. 139 00:11:53,060 --> 00:11:54,830 So can you see it's actually yes. 140 00:11:55,430 --> 00:11:55,760 So. 141 00:11:56,750 --> 00:12:04,170 Here we see our three audio files and their original sizes, so you can then extracted his files from 142 00:12:04,170 --> 00:12:10,820 the Kamaal using Takam, which within the UK's extracts image, as shown here, for example, Taj x 143 00:12:10,820 --> 00:12:12,680 WiFi here. 144 00:12:14,660 --> 00:12:17,420 X x, we fear here. 145 00:12:17,570 --> 00:12:19,730 Let's first A. L. A. Here. 146 00:12:20,060 --> 00:12:29,980 So now task for comprehensive case files here takes me three here and thickens project to cancer. 147 00:12:29,990 --> 00:12:31,790 We expect that these files see it. 148 00:12:36,330 --> 00:12:36,810 Here. 149 00:12:37,760 --> 00:12:39,290 So we expected this for us. 150 00:12:39,620 --> 00:12:47,900 So it's the latest finds there, and I will say that here, as you can see here, we extracted these 151 00:12:47,900 --> 00:12:51,920 files from Take this project a terrifying thing and as you can see here. 152 00:12:52,890 --> 00:12:54,780 So here, no. 153 00:12:55,920 --> 00:13:03,690 Because you are still using the vene, uh, sewage it is come on the show, which files are being extracted 154 00:13:03,690 --> 00:13:04,820 in the output here. 155 00:13:05,610 --> 00:13:12,450 If you want to extract the files and to do so slice slightly meaning without showing any output, you 156 00:13:12,450 --> 00:13:18,750 can simply remove these V, which has been, uh, available for comment and some share. 157 00:13:19,280 --> 00:13:20,070 So. 158 00:13:21,270 --> 00:13:30,660 Here, excessive and nothing outward, but our fans still expect that soon the files have been extracted 159 00:13:30,660 --> 00:13:36,720 into the current directory, you can do a long listing on a die on the directory to double check so 160 00:13:37,010 --> 00:13:43,200 that by default, if an extracted file under the excess tar will remove the existing file and replace 161 00:13:43,200 --> 00:13:44,730 it with the extract file here. 162 00:13:47,500 --> 00:13:52,870 So in later lecture, we will uh, I will show you, uh, compressing the fire, so I'm waiting you 163 00:13:52,870 --> 00:13:53,770 in there to lecture.