Current Article:

How to zip all files in directory in Linux?

How to zip all files in directory in Linux?

zip has a -r (recursive) option to do entire directory trees at once (and not have to worry about the dotfile problem):

zip -r myfiles.zip mydir

where mydir is the directory containing your files. Note that the produced zip will contain the directory structure as well as the files.