unzip file in LInux

unzip file in LInux

Hi,

I am working on a Linux project and we have to extract large number of zip files. I don't have the desktop access of the machine.

We are using ssh for login and then working with the help of terminal.

Now I have to unzip a zip file into a directory.

How I can do this?

Thanks

View Answers

July 6, 2021 at 6:30 PM

Hi,

The zip file is compress file archieve which may contain one or more files in it. If you unzip the file then you will contents of the file in your directory.

For some reason you want to extract the contents into a specify directory then you can use the -d option with the unzip command.

For example your zip file name is mydata.zip and you want to extract to a folder /opt/data/mydata then you can use the following comand;

unzip -d /opt/data/mydata/ mydata.zip

Above unzip command will extract the content of mydata.zip into the /opt/data/mydata/ directory.

If your zip file contains folders and subfolders then unzip command will create folders and sub-folders for placing the files in correct location.

So, you will get correct folder structure after unzipping your file.

Hope this will help you in understanding the use of unzip command.

Thanks

Ads









Related Tutorials/Questions & Answers:
unzip file in LInux
unzip file in LInux  Hi, I am working on a Linux project and we have to extract large number of zip files. I don't have the desktop access.... Now I have to unzip a zip file into a directory. How I can do this? Thanks
unzip file in LInux
unzip file in LInux  Hi, I am working on a Linux project and we have to extract large number of zip files. I don't have the desktop access.... Now I have to unzip a zip file into a directory. How I can do this? Thanks
Advertisements
Unzip File Using Java
Unzipping a File       Lets learn how to unzip a file... argument .To unzip a file first create an object of byte stream then take
unzip
unzip  I have uploaded a docfile and converted into zip file and saved in server. I also downloaded a same file with .zip But i need to unzip a file and save in other location and download it. plz help me out
Unzip a ZIP File
Unzip a ZIP File       How to unzip (extract) a zip file? How to retrieve elements from a zip format file? All these type of questions are solved through
How to extract a zip file to a folder in Linux?
the unzip tool to zip a file. Related Linux tutorials...How to extract a zip file to a folder in Linux? Step by step command... to explain you the usage of unzip tool in Linux and tell you the command to extract
Deploying website war file on linux
Deploying website war file on linux  I have BOLLYWOOD_MIRROR.war file.I want to host it on linux server on path. After deployment of war file its... guidance of hosting war file on linux Thank you
what is etc profile file in Linux
what is etc profile file in Linux  Hi, I want to know more about the /etc/profile file in Linux. What is the use of /etc/profile file? Thanks   Hi, The profile file: /etc/profile Is very import file in Linux
how to check the size of a tar file in linux
how to check the size of a tar file in linux  Hi, I want to check the size of tar file in Linux. How to check the size of a tar file in linux? What Linux command I should use to check the size of a tar file? Thanks
How do I compress a tar file in Linux
How do I compress a tar file in Linux  Hi, I want to create the tar.gz file file of a directory in Linux. My directory contains many sub directories... for creating tar of directory and all the contents inside it. the created tar file should
How do I compress a tar file in Linux
How do I compress a tar file in Linux  Hi, I want to create the tar.gz file file of a directory in Linux. My directory contains many sub directories... for creating tar of directory and all the contents inside it. the created tar file should
How do I compress a tar file in Linux
How do I compress a tar file in Linux  Hi, I want to create the tar.gz file file of a directory in Linux. My directory contains many sub directories... for creating tar of directory and all the contents inside it. the created tar file should
Create tar.gz file in Linux command line
How to create tar.gz file in Linux? In this tutorial I will show you how to create tar.gz file in Linux? We are going to use the Linux console and then run... directory name or file name for adding into the tar.gz file. Linux tar command
How to delete content of a log file from linux terminal?
How to delete content of a log file from linux terminal?  Hi, My production server is on the linux machine. I am trying to debug and find the slow...-queries.log file. Can anyone tell me how to do this? Thanks   Hi, Its
df in linux not showing correct free space after file removal
df in linux not showing correct free space after file removal  Hi, I have deleted a big file in linux but df is not showing correct free space after... is not showing the file. How to resove this issue? df in linux not showing correct
jsf application war file not running in my jboss 6.0 on linux 5.5
jsf application war file not running in my jboss 6.0 on linux 5.5  17:15:47,647 INFO [config] Initializing Mojarra (1.2_08-b06-FCS) for context '/MFPMSDeployment' 17:15:48,354 INFO [TomcatDeployment] deploy, ctxPath=/ 17
ModuleNotFoundError: No module named 'unzip-aes'
ModuleNotFoundError: No module named 'unzip-aes'  Hi, My Python... 'unzip-aes' How to remove the ModuleNotFoundError: No module named 'unzip... have to install padas library. You can install unzip-aes python with following
Reading the data from property file from java stand alone application in linux
Reading the data from property file from java stand alone application in linux  Please send me the example of reading the data from a property file from java stand alone application in linux. I don't know how to give path
Where is my.cnf in linux?
Where is my.cnf in linux?  Hi, Can anyone tell me where is my.cnf in linux? Thanks   Hi, Its is /etc folder. The complete path with file name is /etc/my.cnf. Thanks
jdbc in linux
jdbc in linux  what will be database url if i'm using mysql database on linux platform ? what will be driver name & class name to be used in "Class.forName()" method ? plz give short source code
linux tar folder and subfolders
for me for zipping it into a file possible Linux tar file. I just searched and found that the tar.gz file is best file format for compressing such directories...linux tar folder and subfolders  Hi, I am new to Linux operating
Linux Programming
Linux Programming  1.Write a program that reads an integer by the user and displays it in octal (base 8): Enter an integer number between 0 and 32767: 2012 In octal, your number is: 3734 (Use the same input and output format
Linux
List files recursively in linux
List files recursively in linux  Hi, How to List files recursively in linux? I want to list all the .php file. Thanks   Hi, You can use following command: find . -name *.php -print Thanks
ModuleNotFoundError: No module named 'linux'
ModuleNotFoundError: No module named 'linux'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'linux' How to remove the ModuleNotFoundError: No module named 'linux'
ModuleNotFoundError: No module named 'linux'
ModuleNotFoundError: No module named 'linux'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'linux' How to remove the ModuleNotFoundError: No module named 'linux'
ModuleNotFoundError: No module named 'linux'
ModuleNotFoundError: No module named 'linux'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'linux' How to remove the ModuleNotFoundError: No module named 'linux'
Sitemap Linux Tutorial
| Site Map | Business Software Services India Linux Tutorial Section What is Linux? | Introducing Linux OS | Beginner Guide to Linux Server... | Installing JDK On Linux | Links To Linux Tutorials | Linux Tutorials
Java Programming on Linux
on Linux? I want following tutorials: a) installing and enabling a Java runtime environment on Linux b) Java development on Linux to run Java applications c) Running applets under Linux d) How to install Tomcat on linux? e) How to use Sun
VoIP Linux
VoIP Linux Linux Online -VoIP This document explains about VoIP... lines of VoIP architecture. Linux is available in several formats, called..., and other useful information.      VoIP Linux
ldap configuration for SVN on linux
ldap configuration for SVN on linux  I want to set up ldap and normal file authentication for my SVN in linux. I should i do that? Here basically i need to read file which contains several user name and passwd values and LDAP

Ads