Compressing files with zip

Zip is commonly available compression and archive tool that is available on all operating systems. For example, to archive and compress a directory named cs253, we would use:

zip -r cs253.zip cs253

To unpack an uncompress it, we would use:

unzip cs253.zip

Note that zip does not preserve all the metadata in Linux and is thus not a preferred way to archive and compress. In the context of Linux file systems, “metadata” is information about a file: who owns it, permissions, file type (special, regular, named pipe, etc) and which disk-blocks the file uses. That's all typically kept in an on-disk structure called an inode, which is short for index node. The tar command preserves all such metadata and is thus preferred on Linux file systems.