Find retired however casual it is to make compressed archives from the Linux bid line, utilizing zip. Jack Wallen shows you how.
Recently, I showed you however to make compressed archives from the Linux command-line utilizing the tar command. This clip I privation to show the aforesaid task, but utilizing a instrumentality you're astir apt already acquainted with. The instrumentality successful question is zip, and it creates compressed zip files from immoderate you propulsion astatine it.
SEE: 5 Linux server distributions you should beryllium using (TechRepublic Premium)
So, let's accidental you person the folder TEST and you privation to make the compressed record TEST.zip truthful you tin nonstop it to a colleague. Fortunately, Linux tin usage the zip tool, but first, you mightiness person to instal it with a bid similar sudo apt-get instal zip -y oregon sudo dnf instal zip -y.
Once installed, zip is acceptable to go. Let's compress that TEST folder. How you make the zipped record isn't rather arsenic elemental arsenic you mightiness think. The basal bid is zip NAME.zip NAME (where NAME is the sanction of the folder to beryllium compressed). However, if you simply issued the bid zip TEST.zip TEST, you'd upwind up with a record named TEST.zip, but aft uncompressing it, you'd find it's missing the contents.
Why? Because you lone compressed the folder, not the contents.
To see the contents of the TEST folder, you'd adhd the recursive flag, arsenic successful zip -r TEST.zip TEST.
When you contented the bid with the -r flag, you'll spot zip adds each record wrong the directory to the compressed file. This time, if you decompress the file, with the bid unzip TEST.zip, the contents of the directory stay intact.
And that's each determination is to creating compressed archives from the Linux Command Line Interface, utilizing the zip tool.
Subscribe to TechRepublic's How To Make Tech Work connected YouTube for each the latest tech proposal for concern pros from Jack Wallen.
Open Source Weekly Newsletter
You don't privation to miss our tips, tutorials, and commentary connected the Linux OS and unfastened root applications. Delivered TuesdaysSign up today
- Programming languages: Objective-C slides down the popularity rankings (TechRepublic)
- Codecademy partners with Black and Brilliant for 10-week AI course (TechRepublic)
- How to go a developer: A cheat sheet (TechRepublic)
- Kubernetes: A cheat expanse (free PDF) (TechRepublic)
- Microsoft Linux is not what you thought (or hoped) it would be (TechRepublic)
- A usher to The Open Source Index and GitHub projects checklist (TechRepublic Premium)
- Linux, Android, and much unfastened root tech coverage (TechRepublic connected Flipboard)