Replace filename with the name you want to give the zip file. The .zip extension is automatically appended to the end of the filename. Replace inputfile1 and inputfile2 with the names of the files you wish to include in the zip archive. You can include any number of files here, or you may use an asterisk (*) to include all files in the current directory.
- # to choose individual files to include in the zip
- zip filename inputfile1 inputfile2
- # To include the contents of a directory or directories in a zip archive, use the -r flag:
- zip -r filename directory
- zip -r filename *
You need to login to post a comment.