+1 vote
in Operating Systems by (13.2k points)
What Linux command I should use to zip a folder containing several files?

1 Answer

+1 vote
by (84.8k points)
selected by
 
Best answer

To zip a folder along with all its files, you can use the zip command with "-r" option.

Here is an example:

zip -r archive_name.zip folder_name/

Replace archive_name.zip with your desired zip file name and folder_name/ with the folder you want to zip. 

"-r" option represents recurse-paths i.e. travel the directory structure recursively. All the files and directories in the folder are saved in the zip archive, including files with names starting with "."


...