FOSSology
4.4.0
Open Source License Compliance by Open Source Software
|
Ununpack agent helps in extracting uploaded files. The agent uses depth-first search for traversing and unpacks every file it can.
Ununpack agent uses mimetypes to identify the file type. The list of supported mimetypes and related tools are below and for programmatic use: ununpack_globals.h
Mimetype | Tool |
---|---|
application/gzip | zcat |
application/x-gzip | zcat |
application/x-compress | zcat |
application/x-bzip | bzcat |
application/x-bzip2 | bzcat |
application/x-upx | upx |
application/pdf | pdftotext |
application/x-pdf | pdftotext |
application/x-zip | unzip |
application/zip | unzip |
application/x-tar | tar |
application/x-gtar | tar |
application/x-cpio | cpio |
application/x-rar | unrar |
application/x-cab | cabextract |
application/x-7z-compressed | 7z |
application/x-7z-w-compressed | 7z |
application/x-rpm | rpm2cpio |
application/x-archive | ar |
application/x-debian-package | ar |
application/vnd.debian.binary-package | ar |
application/x-iso | isoinfo |
application/x-iso9660-image | isoinfo |
application/x-fat | fat |
application/x-ntfs | ntfs |
application/x-ext2 | linux-ext |
application/x-ext3 | linux-ext |
application/x-x86_boot | departition |
application/x-debian-source | dpkg-source |
application/x-xz | tar |
application/jar | unzip |
application/java-archive | unzip |
application/x-dosexec | 7z |
application/zstd | zstd |
application/x-lz4 | zstd |
application/x-lzma | zstd |
Usage:
Extracts each file. If filename specifies a directory, then extracts everything in it.
Command line flag | Description |
---|---|
-h | Help, then exit |
-C | Force continue when unpack tool fails |
-d dir | Specify alternate extraction directory. %U substitutes a unique ID |
Default is the same directory as file (usually not a good idea) | |
-m # | Number of CPUs to use (default: 1) |
-P | Prune files: remove links, >1 hard links, zero files, etc |
-R | Recursively unpack (same as '-r -1') |
-r # | Recurse to a specified depth (0=none/default, -1=infinite) |
-X | Remove recursive sources after unpacking |
-x | Remove ALL unpacked files when done (clean up) |
-L out | Generate a log of files extracted (in XML) to out |
-F | Using files from the repository |
-i | Initialize the database queue system, then exit |
-I | Ignore SCM data |
-Q | Using scheduler queue system. (Includes -F) |
If -L is used, unpacked files are placed in 'files' | |
-T rep | Set gold repository name to 'rep' (for testing) |
-t rep | Set files repository name to 'rep' (for testing) |
-A | Do not set the initial DB container as an artifact |
-f | Force processing files that already exist in the DB |
-q | Quiet (generate no output) |
-U upload_pk | Upload to unpack (implies -RQ). Writes to db |
-v | Verbose (-vv = more verbose) |
-V | Print the version info, then exit |