issue192:c_c
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue192:c_c [2023/04/29 18:42] – créée auntiee | issue192:c_c [2023/05/03 11:33] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | So I had to export something from MySQL at work and send it to myself so I could email that to one of our developers. While I still retained some of my know-how when it came to MySQL I almost hit a blank when it came to the compression part. How long has it been since I have archived something on the command line? Donkey’s years!! I felt like a total n00b, and here are my thoughts as a ‘n00b’ as I can totally relate. I’m not going to tell you muscle memory kicked in, rather the ugly truth, I went on to duckduckgo.com and looked it up. Most of this stuff I have not done in 10 years plus. I have been so spoiled by the archivers in the GUI, that I never needed to use it really. Un-archiving was not a problem, but zipping something with sane switches? Having been a wizard with ARJ back in the DOS days, I felt it was time to get reacquainted with compression algorithms. I will start you off with the basics, and try to keep switches out of it. | + | **So I had to export something from MySQL at work and send it to myself so I could email that to one of our developers. While I still retained some of my know-how when it came to MySQL I almost hit a blank when it came to the compression part. How long has it been since I have archived something on the command line? Donkey’s years!! I felt like a total n00b, and here are my thoughts as a ‘n00b’ as I can totally relate. I’m not going to tell you muscle memory kicked in, rather the ugly truth, I went on to duckduckgo.com and looked it up. Most of this stuff I have not done in 10 years plus. I have been so spoiled by the archivers in the GUI, that I never needed to use it really. Un-archiving was not a problem, but zipping something with sane switches? Having been a wizard with ARJ back in the DOS days, I felt it was time to get reacquainted with compression algorithms. I will start you off with the basics, and try to keep switches out of it. |
Let’s start with the one everyone knows, zip. | Let’s start with the one everyone knows, zip. | ||
Ligne 10: | Ligne 10: | ||
Just for completeness sake, zip’s opposite is: | Just for completeness sake, zip’s opposite is: | ||
- | unzip < | + | unzip < |
- | What stands out with plain ol’ zip is that you can split your zipped files. What you will find, more often-than-not is gzip. | + | Bon, j'ai dû exporter quelque chose de MySQL au travail et me l' |
+ | |||
+ | Commençons par celui que tout le monde connaît, zip. | ||
+ | Pour les fichiers .zip, c'est simple : | ||
+ | |||
+ | commande <fichier de destination> | ||
+ | |||
+ | Le bon vieux zip ne supprime pas le fichier source une fois que le fichier de destination est créé. | ||
+ | |||
+ | Pour être complet, le contraire de zip est : | ||
+ | |||
+ | unzip < | ||
+ | |||
+ | |||
+ | **What stands out with plain ol’ zip is that you can split your zipped files. What you will find, more often-than-not is gzip. | ||
Gzip aims to be a simpler zipper, with only one parameter needed. | Gzip aims to be a simpler zipper, with only one parameter needed. | ||
Ligne 30: | Ligne 44: | ||
Bzip or bzip2 that you will see on modern systems works the same as gzip or all intents and purposes. The opposite is bunzip2. | Bzip or bzip2 that you will see on modern systems works the same as gzip or all intents and purposes. The opposite is bunzip2. | ||
- | When you install a Linux OS you may have noticed xz. So it may be available everywhere too, and it works just the same as the above, so unxz it is. | + | When you install a Linux OS you may have noticed xz. So it may be available everywhere too, and it works just the same as the above, so unxz it is.** |
- | I’m not getting into compression ratios or speed here, this is more like an overview to help you remember what goes where. | + | Ce qui distingue le bon vieux zip, c'est qu'il est possible de diviser les fichiers zippés. Ce que vous trouverez, le plus souvent, c'est gzip. |
+ | |||
+ | Gzip vise à être un zipper plus simple, ayant besoin d'un seul paramètre. | ||
+ | |||
+ | Gzip <fichier source> | ||
+ | |||
+ | et bam ! toutes les bases y sont. Gzip supprime le fichier source une fois que le fichier de destination est créé. | ||
+ | |||
+ | Toujours dans un souci d' | ||
+ | |||
+ | gunzip < | ||
+ | |||
+ | Si vous avez besoin d'aide avec gzip, tapez simplement | ||
+ | |||
+ | gzip -h | ||
+ | |||
+ | Bzip ou bzip2, que vous verrez sur les systèmes modernes, fonctionne de la même manière que gzip pour nos besoins. Le contraire est bunzip2. | ||
+ | |||
+ | Lorsque vous installez un système d' | ||
+ | |||
+ | |||
+ | **I’m not getting into compression ratios or speed here, this is more like an overview to help you remember what goes where. | ||
If you do not need any real compression, | If you do not need any real compression, | ||
- | Since remembering what does what, is something I’d rather not do, I’d suggest picking a tool and sticking to it. Whilst it is not usually found on servers, unless the person setting it up had proper foresight, p7zip would be my poison. I remember that by: “It’s and a and an e and it’s non-destructive” meaning, you use an ‘a’ to archive and an ‘e’ to extract and it does not delete the source file. Though the package is name p7zip (not to be confused with peazip) the command is simply 7z. | + | Since remembering what does what, is something I’d rather not do, I’d suggest picking a tool and sticking to it. Whilst it is not usually found on servers, unless the person setting it up had proper foresight, p7zip would be my poison. I remember that by: “It’s and a and an e and it’s non-destructive” meaning, you use an ‘a’ to archive and an ‘e’ to extract and it does not delete the source file. Though the package is name p7zip (not to be confused with peazip) the command is simply 7z.** |
- | That said, I was looking at our logs the other day and I was thinking, if I had to take those, (literally gigabytes in size) I’d use gzip. It is the fastest one on the list above. | + | Je ne parle pas ici de taux de compression ou de vitesse, il s'agit plutôt d'une vue d' |
+ | |||
+ | Si vous n'avez pas besoin d'une réelle compression, | ||
+ | |||
+ | Comme je préfère ne pas me souvenir de ce qui fait quoi, je suggère de choisir un outil et de s'y tenir. Bien qu'on ne le trouve généralement pas sur les serveurs, p7zip serait mon choix, à moins que la personne qui l'a mis en place n'ait fait preuve de prévoyance. Je m'en souviens grâce à : « C'est un a et un e et ce n'est pas destructif », ce qui signifie que vous utilisez un « a » pour archiver et un « e » pour extraire et qu'il ne supprime pas le fichier source. Bien que le paquet s' | ||
+ | |||
+ | |||
+ | **That said, I was looking at our logs the other day and I was thinking, if I had to take those, (literally gigabytes in size) I’d use gzip. It is the fastest one on the list above. | ||
Now... Your mission.... Should you choose to accept it... | Now... Your mission.... Should you choose to accept it... | ||
Ligne 46: | Ligne 88: | ||
As to the switches. This is the reason I suggest you pick one and stick to it. | As to the switches. This is the reason I suggest you pick one and stick to it. | ||
- | Now I’m not saying everything you read here is 100% accurate, my observation skills are not the best, probably why my role play characters always have a really high perception skill, but it should be close enough as damnit is to swearing. To add insult to injury, I just realised my seed brittle is a sesame seed brittle, that no-one but my budgies will like… | + | Now I’m not saying everything you read here is 100% accurate, my observation skills are not the best, probably why my role play characters always have a really high perception skill, but it should be close enough as damnit is to swearing. To add insult to injury, I just realised my seed brittle is a sesame seed brittle, that no-one but my budgies will like…** |
+ | |||
+ | Cela étant dit, je regardais nos journaux l' | ||
+ | |||
+ | Et maintenant... Votre mission.... Si vous l' | ||
+ | |||
+ | Prenez un de vos fichiers vidéo et utilisez « time » pour voir combien de temps il faut à chacun pour compresser et décompresser ce film et tirez vos propres conclusions. Vous savez comment faire, je l'ai fait il y a trois ans. | ||
+ | |||
+ | En ce qui concerne les commutateurs. C'est la raison pour laquelle je vous suggère d'en choisir un et de vous y tenir. | ||
+ | |||
+ | Je ne dis pas que tout ce que vous lisez ici est exact à 100 %, mes capacités d' | ||
+ | |||
+ | |||
+ | **Back in the days of floppies, the split ability was very important, hence my ARJ obsession, but just so you know ARJ, LHA, RAR etc are all still valid. (You may have noticed some files, like when you use NZB are split up into smaller compressed ones.) Just not in a base Linux distro as they are not free or open source. So chances are that your alpine Linux container will not have any, but zip, gzip or xz. Keep that in mind. Should base Linux contain non-free or proprietary compression algorithms? Are free and open source compression algorithms behind the times? Is the network transfer time saved by using better compression, | ||
+ | |||
+ | Did I make a boo-boo? misc@fullcirclemagazine.org** | ||
- | Back in the days of floppies, the split ability was very important, hence my ARJ obsession, | + | À l' |
- | Did I make a boo-boo? misc@fullcirclemagazine.org | + | Ai-je fait une erreur |
issue192/c_c.1682786574.txt.gz · Dernière modification : 2023/04/29 18:42 de auntiee