How to Create a Zip File for Debian
Zip is an archiving and compression tool that can be used in the Linux, Unix, Windows and Mac OSX operating systems. This allows you to create zip files on a Debian system and open the file on a Windows or Mac computer. You can package a single file, or an entire directory in a zip file. If you package a directory, the directory structure will be maintained once the files are unzipped (extracted).
Instructions
-
-
1
Open a terminal window. The terminal window will be found under "Accessories" in the main "Applications" menu.
-
2
Type the command "cd Dir_Name" to change to the directory where the files to be archived are held. Change "Dir_Name" to the name of your directory.
-
-
3
Type the command "zip archive.zip file1 file2 file3" to create a zip file called "archive.zip" containing the files "file1," "file2" and "file3."
-
4
Type the command "ls" to verify that the file has been created.
-
5
Type the command "exit" to close the terminal window.
-
1
Tips & Warnings
Type the command "zip -r dir.zip directory" to create a zip file of an entire directory. The "-r" says to add all subdirectories and files that are found within the parent directory.
You can use the "unzip" command to extract a zip file created on any operating system.