Skip to main content

ext4-cli

Read ext4 filesystems from image files and block devices — without mounting them.

Quick start

# Install (pick one)
cargo install ext4-cli          # From crates.io
pip install ext4-cli            # Via pip
uvx ext4-cli --help             # Run without installing (via uv)

# Use
ext4 --source disk.img ls /etc
ext4 --source disk.img cat /etc/fstab
ext4 --source disk.img cp /etc /tmp/etc-backup -r

Installation

From crates.io

cargo install ext4-cli

From PyPI

pip install ext4-cli
# or run without installing:
uvx ext4-cli ls /

From Homebrew

brew install rvben/tap/ext4

From GitHub releases

Pre-built binaries for Linux (x64, arm64) and macOS (x64, arm64) on the releases page.

Usage

All commands require a source — an ext4 image file or raw block device — via --source or the EXT4_SOURCE environment variable:

export EXT4_SOURCE=/dev/rdisk4s2
ext4 ls /

Commands

ls — list directory contents

ext4 --source disk.img ls                     # List root directory
ext4 --source disk.img ls /etc                # List /etc
ext4 --source disk.img ls -l /etc             # Long format (permissions, uid, gid, size)
ext4 --source disk.img ls -a /etc             # Include dotfiles
ext4 --source disk.img ls --json /etc         # JSON output

cat — print file contents

ext4 --source disk.img cat /etc/fstab
ext4 --source disk.img cat /etc/passwd

cp — extract files

ext4 --source disk.img cp /etc/fstab ./fstab          # Extract a file
ext4 --source disk.img cp /etc /tmp/etc-backup -r     # Extract a directory tree

stat — show file metadata

ext4 --source disk.img stat /etc/fstab
ext4 --source disk.img stat --json /etc/fstab

info — show filesystem metadata

ext4 --source disk.img info
ext4 --source disk.img info --json

Raw block devices (macOS)

On macOS, use the raw disk path (/dev/rdisk*) for better performance. Reading raw block devices requires root access:

sudo ext4 --source /dev/rdisk4s2 ls /

Exit codes

Code Meaning
0 Success
1 General error
2 Permission denied
3 Path not found

Development

make fixtures   # Generate test fixtures (requires e2fsprogs)
make test       # Run tests
make lint       # Run fmt + clippy
make install    # Build and install

License

MIT OR Apache-2.0

Releasing

Vership owns versioning, changelog generation, release commits, and tags. See the release runbook for the verified workflow and recovery policy.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ext4_cli-0.0.5.tar.gz (60.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ext4_cli-0.0.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (772.9 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

ext4_cli-0.0.5-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (735.0 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

ext4_cli-0.0.5-py3-none-macosx_11_0_arm64.whl (693.2 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

ext4_cli-0.0.5-py3-none-macosx_10_12_x86_64.whl (724.4 kB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file ext4_cli-0.0.5.tar.gz.

File metadata

  • Download URL: ext4_cli-0.0.5.tar.gz
  • Upload date:
  • Size: 60.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ext4_cli-0.0.5.tar.gz
Algorithm Hash digest
SHA256 2c83313b0c0a59e7cf4e93eef67588a7c9517fa1efa5abf09b8c722555df8f8e
MD5 b6ed859e4c87d8a6412a64663a3e3d10
BLAKE2b-256 ba49c90b14a9928da071eeeb287211ec786273007fc77beedde4581e0ce2e991

See more details on using hashes here.

File details

Details for the file ext4_cli-0.0.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: ext4_cli-0.0.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 772.9 kB
  • Tags: Python 3, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ext4_cli-0.0.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c90dc48fd982b1653284bd97f4db04b095325337be9efc26173aeebb64c88151
MD5 9409341e4dad1075dcf9c005627080b5
BLAKE2b-256 fbef47dad85963a1119e44b23b8d6d4abbd0080163b5dbf8c063817e012703d0

See more details on using hashes here.

File details

Details for the file ext4_cli-0.0.5-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

  • Download URL: ext4_cli-0.0.5-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 735.0 kB
  • Tags: Python 3, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ext4_cli-0.0.5-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 30cd6ed49a51e8fa36d4476c10194c9e8def63a064f32d68b9bae01f9488a9e7
MD5 f05ea9a981e59a8671474a29585b8c69
BLAKE2b-256 8ef1fd653a53da233e52ebc70aa60735fcea476a73bdfdaf563448f4a1a2cbd8

See more details on using hashes here.

File details

Details for the file ext4_cli-0.0.5-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: ext4_cli-0.0.5-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 693.2 kB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ext4_cli-0.0.5-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 27405f4b60c303ef03c5f1db9fedfc8d9460be923a816f1a4fb33bbe375ba76f
MD5 bc7f59d436e5eb9834e700652c90ebc4
BLAKE2b-256 d407e7a99084e965b09c911218302f11036d27864674a4dd3209fe22d6a55bff

See more details on using hashes here.

File details

Details for the file ext4_cli-0.0.5-py3-none-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: ext4_cli-0.0.5-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 724.4 kB
  • Tags: Python 3, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ext4_cli-0.0.5-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8c5f24dcbbea8328addf577073561c4699374a77cce9a94e8e830249902686ee
MD5 dfda3c14a890f461dec2953fd7be55a5
BLAKE2b-256 edf4d3405745702a718e3474961336b349d93b75a41b59595e6a47a2d689c123

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.5 This release

5 files

0.0.4

5 files

0.0.3

5 files

0.0.2

5 files

0.0.1

5 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page