📜  linux ext-zip * - Shell-Bash (1)

📅  最后修改于: 2023-12-03 15:17:20.472000             🧑  作者: Mango

Linux Ext-zip *

Introduction

The ext-zip tool is a command-line utility for archiving and compressing files and directories in Unix and Linux systems. It is based on the zip and unzip utilities, but with enhanced features for handling Unix file attributes and permissions.

Usage

The basic usage of ext-zip is:

ext-zip archive.zip file1 file2 dir1 dir2

This will create a new archive file archive.zip containing file1, file2, dir1, and dir2. If archive.zip already exists, ext-zip will update it with any new or modified files.

ext-zip can also extract files from an archive using the unzip command:

unzip archive.zip

This will extract all files in archive.zip to the current directory.

Options

ext-zip supports several options for customizing the archive:

  • -r: Recursively add files from directories.
  • -j: Store only the files, not the directory structure.
  • -y: Store symbolic links in the archive.
  • -X: Store extended Unix file attributes (owner, group, permissions, etc.).
  • -v: Verbose output.
  • -h: Show help message.
Examples

Create a new archive with extended attributes and verbose output:

ext-zip -Xv archive.zip file1 file2 dir1 dir2

Extract files from an archive:

unzip archive.zip

Extract files from an archive with verbose output:

unzip -v archive.zip
Conclusion

The ext-zip tool is a powerful utility for archiving and compressing files and directories in Unix and Linux systems. Its support for extended file attributes and Unix permissions make it an excellent choice for backup and archival purposes.