zipping files

Hi,

Is there any difference if files are individually zipped and archived in a directory or if files are moved into archiving directory and zipping that directory.

I'm confused.

What you probably want to do.

  1. tar the whole directory
tar cvf mytarball.tar  ./mydirectory
  1. zip the tar file
gzip mytarball.tar
#  gives a final product: mytarball.tar.gz

This way you do not lose the directory itself.

Thanks jim mcnamara,

The point is from space point of view,

  1. Zipping the individual files and moving them into a directory and zipping the whole directory directory again
    and
  2. Move all the files into a directory and zip the directory once

both are same?

If we zip the files first, move them into a directory and zip the directory again will save the space than the second one?

To zip the directory with all zipped files will use more space than zip the directory directly.