Simple Zipping and Unzipping on Linux
Nothing important here, move to Zipping part.
It's so weird that nobody on internet talks about how to zip and unzip on linux.
I happened to find some articles about this topic but I only got the ones that talk about tar or gz file types.
ChatGPT has destroyed people's mind and I was frustrated just like you. So, here is a quick tutorial of zipping and unzipping.
Zipping:
So let's say you have a zipped file with name:
alice.zip
How do you unzip this file? Here's the command:
zip -r alice.zip alice
Let me explain what's happening in the above command:
- zip : tool name
- -r : flag to make it recursively
- alice.zip : Final result zip file that you need
- alice : folder to zip
Unzipping:
Now about Unzipping:
unzip alice.zip -d bob
About this command:
- unzip : tool name
- alice.zip : Zipped file that you want to unzip
- -d : flag to to specify the directory of extraction
- bob : folder to put the contents of the zipped file
The main thing here is that the directory doesn't have to exist before you run unzip command.
I hope it helped you.
Stay tuned on my 𝕏 account for updates. Thank you!