我如何压缩/压缩符号链接?

这是可能的,我怎样才能从Linuxshell压缩符号链接

    您可以使用标准zip--symlinks参数将符号链接存储为符号链接(而不是它们指向的文件/目录的副本)。

    假设foo是一个包含符号链接的目录:

     zip --symlinks -r foo.zip foo/ 

    相当于Rar:

     rar a -ol foo.rar foo/ 

    tar按默认的方式存储它们。

     tar czpvf foo.tgz foo/ 

    请注意,符号链接本身几乎不占用磁盘空间(只是一个inode)。 这只是文件系统中的一种指针,正如你可能知道的那样。

    在RHEL 5上,我们有

     $ zip -h Copyright (C) 1990-2005 Info-ZIP Type 'zip "-L"' for software license. Zip 2.31 (March 8th 2005). Usage: zip [-options] [-b path] [-t mmddyyyy] [-n suffixes] [zipfile list] [-xi list] (snip) -y store symbolic links as the link instead of the referenced file