Saturday, 13 Dec 2025
Subscribe
logo
  • Global
  • AI
  • Cloud Computing
  • Edge Computing
  • Security
  • Investment
  • Sustainability
  • More
    • Colocation
    • Quantum Computing
    • Regulation & Policy
    • Infrastructure
    • Power & Cooling
    • Design
    • Innovations
    • Blog
Font ResizerAa
Data Center NewsData Center News
Search
  • Global
  • AI
  • Cloud Computing
  • Edge Computing
  • Security
  • Investment
  • Sustainability
  • More
    • Colocation
    • Quantum Computing
    • Regulation & Policy
    • Infrastructure
    • Power & Cooling
    • Design
    • Innovations
    • Blog
Have an existing account? Sign In
Follow US
© 2022 Foxiz News Network. Ruby Design Company. All Rights Reserved.
Data Center News > Blog > Global Market > Compressing files using the zip command on Linux
Global Market

Compressing files using the zip command on Linux

Last updated: May 14, 2024 4:59 am
Published May 14, 2024
Share
Interlocking manufacturing gears with binary code overlay.
SHARE

$ zip -q bin bin/*
$

If you’re zipping a listing that incorporates subdirectories, these subdirectories, however not their contents will probably be added to the zip file until you add the -r (recursive). Right here’s an instance:

$ zip bin bin/*
updating: bin/FindFiles (deflated 54%)
updating: bin/shapes (deflated 63%)
updating: bin/shapes2 (deflated 62%)
updating: bin/shapes3 (deflated 45%)
updating: bin/NOTES/ (saved 0%)

Right here’s an instance that provides -r and, consequently, consists of the NOTES subdirectory’s information within the bin.zip file is it creating.

$ zip -r bin bin/*
updating: bin/FindFiles (deflated 54%)
updating: bin/shapes (deflated 63%)
updating: bin/shapes2 (deflated 62%)
updating: bin/shapes3 (deflated 45%)
updating: bin/NOTES/ (saved 0%)
  including: bin/NOTES/finding_files (deflated 5%)
  including: bin/NOTES/shapes_scripts (deflated 35%)

Utilizing encryption passwords

So as to add a password that may should be used to extract the contents of a zipper file, use a command just like the one proven under. Discover that it prompts twice for the password, although it doesn’t show it.

$ zip -e -r bin bin/*
Enter password:
Confirm password:
updating: bin/FindFiles (deflated 54%)
updating: bin/shapes (deflated 63%)
updating: bin/shapes2 (deflated 62%)
updating: bin/shapes3 (deflated 45%)
updating: bin/NOTES/ (saved 0%)
updating: bin/NOTES/finding_files (deflated 5%)
updating: bin/NOTES/shapes_scripts (deflated 35%)

Extracting file from a zipper file

To extract the contents of a zipper file, you’ll use the unzip command. Discover that, as a result of the zip file under was encrypted with a password, that password must be provided to extract the contents.

$ unzip bin.zip
Archive:  bin.zip
[bin.zip] bin/FindFiles password:
  inflating: bin/FindFiles
  inflating: bin/shapes
  inflating: bin/shapes2
  inflating: bin/shapes3
   creating: bin/NOTES/
  inflating: bin/NOTES/finding_files
  inflating: bin/NOTES/shapes_scripts

If you wish to extract the contents of a zipper file to a distinct listing, you don’t have to cd to that listing first. As an alternative, you possibly can merely add the -d choice adopted by the goal listing to specify the brand new location.

$ unzip bin.zip -d /tmp
Archive:  bin.zip
[bin.zip] bin/FindFiles password:
  inflating: /tmp/bin/FindFiles
  inflating: /tmp/bin/shapes
  inflating: /tmp/bin/shapes2
  inflating: /tmp/bin/shapes3
   creating: /tmp/bin/NOTES/
  inflating: /tmp/bin/NOTES/finding_files
  inflating: /tmp/bin/NOTES/shapes_scripts

You’ll be able to extract a single file from a zipper file if you happen to specify its title as listed within the zip file. Right here’s an instance command the place the unique file (perhaps it’s been broken indirectly) is changed after confirming that that is what you need.

See also  U.S. Firms Reassessing Cloud Strategies, Citrix Reports

Source link

TAGGED: command, Compressing, files, Linux, zip
Share This Article
Twitter Email Copy Link Print
Previous Article Tishman Speyer To Develop Its First Data Center Tishman Speyer To Develop Its First Data Center
Next Article Squarespace_Logo Squarespace to Go Private in $6.9B All-Cash Deal with Permira
Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Your Trusted Source for Accurate and Timely Updates!

Our commitment to accuracy, impartiality, and delivering breaking news as it happens has earned us the trust of a vast audience. Stay ahead with real-time updates on the latest events, trends.
FacebookLike
TwitterFollow
InstagramFollow
YoutubeSubscribe
LinkedInFollow
MediumFollow
- Advertisement -
Ad image

Popular Posts

Is Automation Changing the Game?

Safety assurance is essential for bigger organizations, as senior managers are more and more accountable…

September 5, 2024

Next-gen AI chips will draw 15,000W each, redefining power, cooling, and data center design

“Dublin imposed a 2023 moratorium on new information facilities, Frankfurt has no new capability anticipated…

June 19, 2025

US Data Center Operator Equinix Plans $390m Africa Build | Data Center Knowledge

(Bloomberg) -- Nasdaq-listed Equinix will make investments $390 million in Africa over the subsequent 5 years…

February 23, 2024

NXP acquires Kinara for $307M to bolster edge AI in industrial and automotive sectors

NXP Semiconductors has introduced its acquisition of Kinara, a pacesetter in high-performance, energy-efficient neural processing…

February 12, 2025

Sound Point Capital Holds $1.1 Billion First Close of Strategic Capital Fund III

Sound Point Capital Management, a NYC-based international various credit score supervisor with greater than $44…

August 11, 2025

You Might Also Like

Why data centre megadeals must prove their value
Global Market

Why data centre megadeals must prove their value

By saad
photo illustration of clouds in the shape of dollar signs above a city
Global Market

Cloud providers continue to push EU court to undo Broadcom-VMware merger

By saad
Kao SEED Fund awards £30,000 to Harlow community projects
Global Market

Kao SEED Fund awards £30,000 to Harlow community projects

By saad
Close Up Portrait of Woman Working on Computer, Lines of Code Language Reflecting on her Glasses from Big Display Screens. Female Programmer Developing New Software, Coding, Managing Cybersecurity
Global Market

FinOps Foundation sharpens FOCUS to reduce cloud cost chaos

By saad
Data Center News
Facebook Twitter Youtube Instagram Linkedin

About US

Data Center News: Stay informed on the pulse of data centers. Latest updates, tech trends, and industry insights—all in one place. Elevate your data infrastructure knowledge.

Top Categories
  • Global Market
  • Infrastructure
  • Innovations
  • Investments
Usefull Links
  • Home
  • Contact
  • Privacy Policy
  • Terms & Conditions

© 2024 – datacenternews.tech – All rights reserved

Welcome Back!

Sign in to your account

Lost your password?
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.
You can revoke your consent any time using the Revoke consent button.