erc(1)
| ERC(1) | General Commands Manual | ERC(1) |
NAME
erc - a universal archive tool
SYNOPSIS
erc [options] [command] name [target]
DESCRIPTION
ERC is a universal command-line archive manager that provides a unified interface for working with various archive formats. It uses patool as the primary backend, with 7z as a fallback when patool is not available.
When extracting, erc decides where to place files:
- Single file in archive — extracted to the current directory.
- Single directory in archive — renamed to match the archive basename.
- Multiple files or directories — extracted into a subdirectory named after the archive.
Use erc basename to see the predicted directory name for an archive.
COMMANDS
- a, create, pack, add
- Create archive or add files to archive.
- x, extract, unpack
- Extract files from archive.
- l, list
- List archive contents.
- t, test, check
- Test archive integrity.
- type
- Print archive type.
- basename
- Print the predicted directory name for the archive.
- repack, conv
- Convert archive to another format.
- formats
- List supported archive formats.
- b, bench, benchmark
- Run CPU benchmark.
- diff
- Compare two archives (requires patool).
- search, grep
- Search in archive files (requires patool).
Commands can also be used with a dash prefix: -a, -x, -l, -t, -b.
OPTIONS
- -h, --help
- Display help.
- -V, --version
- Show version and exit.
- -q, --quiet
- Quiet mode.
- -f, --force
- Force override target.
- -C DIR
- Extract to specified directory. The directory is created if it does not exist.
- --directory DIR, --extract-to DIR, --destination DIR, --outdir DIR
- Same as -C. Long options also accept = syntax (e.g. --directory=DIR).
- --here, --no-subdir
- Extract to current directory (or -C directory) without creating a subdirectory.
- -j, --flat, --junk-paths
- Extract all files without directory structure (strip paths).
- --use-patool
- Force use patool as backend.
- --use-7z
- Force use 7z as backend.
EXAMPLES
# erc a archive.zip file(s)... - pack files to archive.zip
# erc file(s)... zip: - pack file(s) to zip archive
# erc dir - pack directory to dir.zip
# erc [x] archive.zip - unpack archive
# erc -C dir archive.zip - extract directly into dir
# erc --here archive.zip - extract without creating subdirectory
# erc --flat archive.zip - extract all files stripping paths
# erc l archive.zip - list files of the archive
# erc [repack] archive1.zip 7z: - repack to 7z
# erc [repack] archive.zip archive.7z - repack zip to 7z
# erc -f repack archive.zip archive.7z - repack (override target)
# erc basename archive.tar.gz - print predicted directory name
# erc type archive.zip - print archive type
ENVIRONMENT
- ERC_BACKEND
- Set to patool or 7z to force a specific backend.
BUGS
Please report any bugs to lav@etersoft.ru
EXIT STATUS
erc will return zero on success and non zero on operation failure.
SEE ALSO
- http://wiki.etersoft.ru/ERC
- ERC wiki page
| March 2026 | Version @VERSION@ |
