How To Zip A Folder In Linux Using Zip
If you want to compress a file or folder in desktop linux its just a matter of a few clicks.
How to zip a folder in linux using zip. Now imagine one week later you download two new albums. Zip a folder in ubuntu linux using gui. This isnt unique to zip. How to extract files from a targz or tarbz2 file on linux.
You can get documentation for most commands this way. Go to the folder where you have the desired files and folders you. You may already know that linux and unix like operating systems such as macos have tools to allow you to create zip files and extract files from them called zip and unzip. If you use windows 7 zip to be specified to unzip a targz file it takes two rounds.
Zipping a folderdirectory using the command line interface cli if you dont have any graphical desktop environment installed on your computer dont worry. The easiest way to zip a folder on linux is to use the zip command with the r option and specify the file of your archive as well as the folders to be added to your zip file. It increases the total unzipping time especially for large files eg. One to unzip targz file into a tar file the next one to unzip that tar file into the original content.
For example imagine you have a music folder with four albums in it and you create an archive called musiczip to keep as a backup. Logs xiao oct 5 16 at 1211. The zip command comes with documentation telling you about all of its many options. Zip is a compression and file packaging utility for unix vms msdos os2 windows 9xntxp minix atari macintosh amiga and acorn risc os.
Linux zip command examples. In this tutorial we will show you how to zip compress files and directories in linux using the zip command. Zip files can be easily extracted in windows macos and linux using the utilities available for all operating systems. I have been using tar cvzf for quite a while.
Open the terminal and type the following command. Type man zip to see that documentation. You can also tell zip to not store the paths with the j junk paths option. A backupzip file should be created.
Zip command zip is a command line utility that helps you create zip archives. First install the zip command using apt command or apt get command. Though i have used ubuntu here the method should be pretty much the same in other distributions using gnome or other desktop environment. This is the zip archive of the downloads directory.
Zip unzip and other utilities. The syntax is zip r filenamezip folder zip r filenamezip folder1 folder2. One thing to note. Zip a folder in ubuntu linux using the cli.
You can also specify multiple folders if you want to have multiple directories compressed in your zip file. First go to the. To add the new albums to the zip file simply run the same zip command as you did the previous week. Sudo apt install zip unzip.
You can still use the command line interface cli to zip archive a folder.