This article assumes you have at least basic knowledge of Linux, i.e. Compress and decompress programs that supports zip format are available on major platforms such as Linux, Windows and macOS.Zipped files are small enough to conveniently transfer over the internet, including uploading, downloading, and attaching them on email.Compressed/zipped files so that they eat up less disk space.The zip format is hugely popular because it can: On the other hand, unzip is a utility tool that helps you decompress files and folders. File and folder compression allows for quicker and more reliable file and folder transfer, storage, and email. Zip is a command-line utility tool used to compress files in Linux. You can use these commands on almost every Linux system.In this tutorial, we will show you how to install Zip and Unzip on a Linux system. In this article, we have learnt different ways to unzip file in Linux. Sometimes you may want to see the contents of zip file without actually extracting it. If you want to extract specific file such as file.txt from extraction, use -x option as shown below. $ unzip data.zip -d /home/projectsĪgain, if you get ‘permission denied’ error, add sudo keyword at the beginning of your command. Here is an example to unzip files to /home/projects folder. If you want to extract file to specific folder, you can do so with -d option. So far we have seen all examples that extract zip files to our present working directory. Please note to add quotes around *.zip below. Here is the command to extract all zip files in your present working directory. You can also use wildcard characters such as * to extract multiple zip files. If will extract all files & folders to your present working directory. If you need to unzip multiple files, you can specify them one after the other in a space-separated manner, as shown below $ unzip data.zip users.zip project.zip Unzip will extract all files & folders in specified file and place them in your present working directory. So it is advisable to mention the full path in unzip command. Please note, if you only specify the filename with unzip command, it will look for the file in your present working directory, and give an error ‘file not found’ if it is unable to find the file. If the above command gives an error ‘permission denied’ use sudo keyword at the beginning of command or run the command as root user. Here is the command to unzip data.zip file. Once you have installed unzip, you can easily unzip file with the following command. Unlike tar, which does bot compression and decompression, zip only does compression while unzip does decompression. If you need to zip files & folders then you need to install zip by adding it to the above commands. Please note, zip and unzip are different utilities and need to be installed separately. RHEL/CentOS/SUSE/Fedora $ yum install unzip Ubuntu/Debian $ sudo apt-get install unzip So you will need to install them with the following command. In most Linux systems, you will not find unzip utility to be installed by default. Here are the steps to unzip file in Linux. You can use these steps on any Linux distribution. In this article, we will learn how to unzip file in Linux. Sometimes you may need to unzip one or more files & folders in Linux. Zip is a popular compression format for files & folders in Windows & Linux.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |