And if there a password you can also use -P
.
How to unzip a file on mac/Linux using Terminal
1. Extract in the same dir:
Here is the command in case you want to extract in the present directory
Command:
unzip <source_file_path>.zip
Example:
unzip interviewbubble.zip
2. unzip Password Protected File:
if there a password you can also use -P not -p
it’s a different option
Command:
unzip -P <password> <sorce_file_path>.zip
Example:
unzip -P 123456 interviewbubble.zip
3. Extract to a particular destination folder
if you want to extract to a particular destination folder, you can use
Command:
unzip <sorce_file_path>.zip -d <destination_path>
Example:
unzip interviewbubble.zip -d /User/admin/Desktop
If the unzip package isn’t already installed on your system, then run:
sudo apt-get install unzip