To zip a folder in Ubuntu or Debian Linux, you can use the zip
command. The zip
command is a command-line utility for creating zip archives.
Here's an example of how to use the zip
command to zip a folder:
zip -r folder.zip /path/to/folder
This command will create a zip archive called folder.zip
that contains the contents of the /path/to/folder
directory. The -r
option tells zip
to recursively include the contents of all subdirectories.
You can also use the -9
option to enable maximum compression, and the -m
option to delete the original files after they have been added to the zip archive:
zip -9mr folder.zip /path/to/folder