Compression & Archiving commands

找到 161 条

File inspection

91 commands

Extract any archive

Useful Linux one-liner

a() { case $1 in *.tar.gz) tar xzf $1;; *.zip) unzip $1;; esac; }; a file
Details

7z

high-compression file archiver supporting multiple formats

7z a [archive.7z] [files...]
Details

7za

standalone file archiver from the 7-Zip family

7za a [archive.7z] [files...]
Details

7zr

minimal 7z-only file archiver

7zr a [archive.7z] [files...]
Details

aria2

Multi-protocol multi-source download utility

aria2c [https://example.com/file.zip]
Details

asar

Pack and extract Electron application archives.

asar pack [dir/] [output.asar]
Details

aws-lambda

Manage serverless functions and event-driven compute.

aws lambda create-function --function-name [my-function] --runtime python3.11 --role [arn:aws:iam::account:role/lambda-role] --handler [index.handler] --zip-file fileb://[function.zip]
Details

axel

Lightweight multi-connection download accelerator

axel [https://example.com/file.zip]
Details

bar

Display progress bars for data transfers.

bar -if [input_file] -of [output_file]
Details

bunzip2

Decompress bzip2 compressed files

bunzip2 [file.txt.bz2]
Details

bzcat

Decompress bzip2 files to standard output

bzcat [file.txt.bz2]
Details

bzegrep

Search bzip2 files using extended regular expressions

bzegrep "[pattern]" [path/to/file.bz2]
Details

bzfgrep

Search bzip2 files for fixed string patterns

bzfgrep "[string]" [path/to/file.bz2]
Details

bzgrep

Search bzip2 compressed files for patterns

bzgrep ["pattern"] [file.bz2]
Details

bzip3

High-performance file compressor with improved ratios over bzip2

bzip3 [file.txt]
Details

bzless

View bzip2 compressed files with less pager

bzless [file.txt.bz2]
Details

bzmore

View bzip2 compressed files with more pager

bzmore [file.txt.bz2]
Details

cheat

interactive command-line cheatsheets

cheat [tar]
Details

ci

Check in RCS revisions

ci [path/to/file]
Details

clamav

open-source antivirus toolkit

clamscan [path/to/file]
Details

cpio

Archive utility with stdin file lists

find . -depth | cpio -o > [archive.cpio]
Details

docker-save

save Docker images to tar archives

docker save -o [image.tar] [image]
Details

dpkg-deb

Debian archive manipulation tool

dpkg-deb -I [path/to/file.deb]
Details

dtrx

intelligent archive extraction tool

dtrx [archive.tar.gz]
Details

ect

lossless image compression optimizer

ect [image.png]
Details

factorio

Headless multiplayer game server

[path/to]/factorio --create [path/to/save_file.zip]
Details

ffsend

encrypted file sharing client

ffsend upload [file.zip]
Details

funzip

extract the first member of a ZIP or gzip archive from a pipe

cat [file.zip] | funzip > [output]
Details

git-archive

Create archives of repository files without version control metadata

git archive HEAD -o [archive.tar]
Details

git-verify-pack

Validate packed Git archive files

git verify-pack .git/objects/pack/pack-hash.idx
Details

gunzip

decompresses files compressed by gzip, zip, compress, or pack

gunzip [file.gz]
Details

gzip

compresses files using the Lempel-Ziv coding algorithm

gzip [file]
Details

jar

Java Archive tool

jar cf [output.jar] [files...]
Details

Directory listing

65 commands

aim

Command-line download/upload tool with resume

aim [https://domain.com/file.tar.gz] .
Details

ali

HTTP load testing tool with real-time TUI charts

ali [http://host.xz]
Details

apt-clone

Backup and restore installed package states

sudo apt-clone clone [path/to/directory]
Details

bgpgrep

Filter and search BGP routing data in MRT format

bgpgrep [path/to/rib.mrt.gz] -subnet [192.0.2.0/24]
Details

bkp

simple utility for creating backups of files and directories

bkp [path/to/file]
Details

brotli

Compress and decompress files with the Brotli algorithm

brotli [file.txt]
Details

bsdiff

Create and apply binary patches

bsdiff [oldfile] [newfile] [patch.bsdiff]
Details

build

Build Python packages for distribution

python -m build
Details

bzip2

Block-sorting file compressor

bzip2 [file.txt]
Details

compress

reduce file sizes using LZW compression

compress path/to/file1 path/to/file2
Details

cpan

Perl module installer from CPAN

cpan [Module::Name]
Details

cpanm

Zero-configuration CPAN installer

cpanm [Module::Name]
Details

crane-push

upload tarball as container image

crane push [image.tar] [registry/repo:tag]
Details

crc32

CRC-32 checksum calculator

crc32 [path/to/file]
Details

curl

transfer data with URLs

curl -O [https://example.com/file.zip]
Details

diffoscope

deep recursive file comparison tool

diffoscope [file1] [file2]
Details

eget

GitHub release binary downloader

eget [owner/repo]
Details

gau

URL fetcher from multiple archive sources

gau [example.com]
Details

installpkg

installs Slackware packages, which are compressed tar archives containing

sudo installpkg [path/to/package.tgz]
Details

instaloader

downloads pictures, videos, captions, and metadata from Instagram profiles

instaloader [profile_name]
Details

lrztar

wrapper for lrzip that simplifies compression of directories

lrztar [path/to/directory]
Details

lrzuntar

Extract whole tarballs from .tar.lrz files

lrzuntar [archive.tar.lrz]
Details

lsar

lists the contents of archive files

lsar [archive.zip]
Details

lure

Community package manager for all Linux distros

lure install [package]
Details

lzfgrep

Search compressed files for fixed strings

lzfgrep [string] [file.lz]
Details

mat2

removes metadata from files to protect privacy

mat2 [file.jpg]
Details

mysqldump

creates logical backups of MySQL databases

mysqldump -u [user] -p [database] > [backup.sql]
Details

pacman-u

short form of pacman --upgrade, install or upgrade from local package files

tldr pacman upgrade
Details

pacman-upgrade

installs packages from local archive files rather than from remote repositories

sudo pacman -U path/to/package.pkg.tar.zst
Details

par2

creates and uses PAR2 files for data recovery

par2 create [backup.par2] [files]
Details

paramspider

discovers URL parameters by mining web archives

paramspider -d [example.com]
Details

Text processing

25 commands

aapt2

next-generation Android resource compiler and packager

aapt2 compile [path/to/resource.xml] -o [output_directory]
Details

apt-secure

Archive authentication and trust model documentation.

man apt-secure
Details

ar

Create and manage static library archives

ar rcs [archive.a] [file1.o] [file2.o]
Details

archivemount

Mount archive files as virtual filesystems via FUSE

archivemount [path/to/archive] [path/to/mount_point]
Details

bgzip

Block compression with random access support for genomics data

bgzip [file.vcf]
Details

bzdiff

Compare bzip2 compressed files

bzdiff [file1.bz2] [file2.bz2]
Details

fsarchiver

filesystem backup and restore tool

sudo fsarchiver savefs [archive.fsa] [/dev/sda1]
Details

localedef

compiles locale definition files into binary locale data that can be

localedef --list-archive
Details

ludusavi

backs up and restores video game save data

ludusavi backup
Details

lvmdump

collects diagnostic information about the LVM2 subsystem for troubleshooting

lvmdump
Details

ouch

compresses and decompresses archives

ouch compress [file1] [file2] [archive.tar.gz]
Details

pg_archivecleanup

removes old WAL archive files no longer needed by standby servers

pg_archivecleanup [archive_dir] [oldest_kept_wal]
Details

sbuild

Build Debian packages in clean chroot environments

sbuild [package.dsc]
Details

sqfstar

Create squashfs filesystem from tar archives

sqfstar < [archive.tar] [filesystem.squashfs]
Details

tarsnap

Encrypted deduplicated online backup

tarsnap -c -f [backup-name] [/path/to/backup]
Details

unshar

Extract files from shell archives

unshar [archive.shar]
Details

xar

Extensible archive format tool

xar -cf [archive.xar] [files]
Details

xzdiff

Show differences in xz compressed files

xzdiff [file1.xz] [file2.xz]
Details

zipsplit

Split ZIP archive into smaller parts

zipsplit [path/to/archive.zip]
Details

zsoelim

Process .so includes in roff source files

zsoelim [file.man]
Details

Search and filters

19 commands

apptainer-exec

Execute a command within an Apptainer container.

apptainer exec [container.sif] [command]
Details

arc

Create and extract ARC format archives

arc a [archive.arc] [files]
Details

fcrackzip

crack password-protected ZIP archives

fcrackzip [-b|--brute-force] [-l|--length] 4-8 [-c|--charset] aA1 [archive]
Details

gpg-zip

Encrypt or sign files into a GPG archive (deprecated)

gpg-zip --symmetric --output [archive.gpg] [directory]
Details

haxelib

Package manager for the Haxe programming language

haxelib install [library]
Details

ia

Internet Archive command-line tool

ia download [item-name]
Details

lzma

compresses files using the Lempel-Ziv-Markov chain Algorithm

lzma [file]
Details

pgbackrest

Reliable PostgreSQL backup and restore tool

pgbackrest --stanza=[name] stanza-create
Details

phar

manages PHP Archive files, which bundle PHP applications into single

phar add -f [path/to/archive.phar] [files...]
Details

rar2john

Extract password hashes from RAR archives

rar2john [archive.rar] > [hash.txt]
Details

recover

alias for restore — extract files from a dump(8) backup

tldr restore
Details

rzip

Long-range compression for large files

rzip [file]
Details

sbopkg

SlackBuilds.org package management tool

sbopkg -r
Details

xzgrep

Search xz compressed files with grep

xzgrep "[pattern]" [file.xz]
Details

zcmp

Compare gzip-compressed files byte-by-byte

zcmp [file1.gz] [file2.gz]
Details

Archive and compression

15 commands

docker-load

load Docker images from tar archives

docker load -i [image.tar]
Details

importctl

manages disk images for systemd containers and system extensions

sudo importctl pull-tar [URL] [name]
Details

lbzip2

parallel bzip2 compressor and decompressor

lbzip2 [file]
Details

mkosi

builds customized, modern Linux OS images

mkosi summary
Details

pax

POSIX archiver

pax -wf [archive.pax] [directory]
Details

pg_restore

restores PostgreSQL databases from archives created by pg_dump

pg_restore -d [database] [backup.dump]
Details

podman-export

Export container filesystem as tar archive

podman export [container] -o [container.tar]
Details

rig

Generate random identity data

rig
Details

unzip

Extract files from ZIP archives

unzip [archive.zip]
Details

File operations

7 commands

caprover

Deploy and manage applications on CapRover

caprover login
Details

docker-cp

copy files between containers and the host

docker cp [container]:[/path/to/file] [/local/path]
Details

kubectl-cp

copies files and directories between local filesystem and containers in pods

kubectl cp [localfile] [pod-name]:[/path/in/container]
Details

lzip

lossless data compressor using the LZMA algorithm

lzip [file]
Details

ranger

Terminal file manager with vim keybindings

ranger
Details

zip

Create and modify ZIP archives

zip [archive.zip] [file1] [file2]
Details

Containers and orchestration

2 commands

crane-pull

download container image as tarball

crane pull [image:tag] [output.tar]
Details

crane

interact with container registries without Docker

crane pull [registry/image:tag] [output.tar]
Details

Network diagnostics

2 commands

dive

explore Docker image contents and layer efficiency

dive [image:tag]
Details

odps-func

Manage MaxCompute user-defined functions from odpscmd

list functions;
Details

HTTP and downloads

1 commands

shot-scraper

Automated website screenshot tool

shot-scraper [https://example.com]
Details

Package management

1 commands

repo-add

Add packages to Arch Linux repository

repo-add path/to/database.db.tar.gz
Details

Processes and services

1 commands

engrampa

MATE desktop archive manager

engrampa [path/to/archive1.tar] [path/to/archive2.tar]
Details

SSH and remote access

1 commands

Security tools

1 commands

Shell workflow

1 commands

crane-export

export flattened image filesystem

crane export [image] [output.tar]
Details

Users and permissions

1 commands

jarsigner

signs and verifies Java Archive files

jarsigner -keystore [keystore.jks] [app.jar] [alias]
Details

aptitude-run-state-bundle commands

1 commands

ark commands

1 commands

ark

Create, view, and extract archives graphically.

ark -b [path/to/archive]
Details

atool commands

1 commands

atool

Manage archives in various formats with a unified interface

atool -x [archive.tar.gz]
Details

bdfr commands

1 commands

bdfr

Bulk download submissions and media from Reddit

bdfr download [./output] --subreddit [Python] -L [10]
Details

cargo commands

1 commands

crane commands

1 commands

crane-append

add layers to container images

crane append -b [base_image] -f [layer.tar.gz] -t [new_image:tag]
Details

pct commands

1 commands

pct-create

creates a new LXC container in Proxmox VE from a template image

pct create 100 local:vztmpl/distro.tar.zst --rootfs local-lvm:4
Details

pg_dump commands

1 commands

pg_dump

utility for backing up PostgreSQL databases

pg_dump [database_name] > [backup.sql]
Details

pg_receivewal commands

1 commands

pg_receivewal

streams WAL from server to archive

pg_receivewal -D [wal_dir] -h [host] -U [username]
Details

pkgutil commands

1 commands

pkgutil

Query and manage macOS package receipts

pkgutil --pkgs
Details

unar commands

1 commands

unar

Universal multi-format archive extractor

unar [archive.zip]
Details

unrar commands

1 commands

unrar

Extract RAR archive files

unrar x [archive.rar]
Details