leonardoaguiar.com

inspector

A magnifying glass for the disk.

inspector looks at a folder, a file or anything else on the disk and says everything there is to know about it. Every folder at its real size, measured to the bottom; the same folder as a tree, a map, by kind of file, by age, by size or by its biggest files; and for one file, a card with what it is by its bytes, its sizes, dates, flags, attributes and hash. Any of it as JSON.

  • macOS, Linux & Android
  • Free

डॉक्यूमेंटेशन · बदलावों की सूची

  • 8 ways to look at a folder
  • 1 binary
  • 0 dependencies
  • 0 network calls you didn't ask for

ls says a folder takes a few bytes. inspector looks inside, every way there is.

One pass over the disk measures every folder to the bottom, and the same measure comes back as a list, a tree, a map, three breakdowns, the biggest files or a card for one item.

Folders at their real size

Each folder is walked to the bottom and shows the space everything inside it takes: the same number du gives, with the permissions, owner, last change, files and folders inside, data and space on disk, share of the total and a bar against the biggest item.

Eight views, one measure

The list, a tree of the first levels, a map, by kind of file, by age, by size, the biggest files anywhere inside, and the card of one item. The kinds, ages, sizes and biggest files are counted on the same pass, so every view costs the same as the list.

A map of the disk

Every item a rectangle whose area is its share of the total, the biggest at the top left, filled with the colour of its size. The items too small for a box share one shaded block. A whole disk in one screen.

The card of one item

Everything about one file: what it is by its bytes, among a few hundred kinds (images with their dimensions, movies with their duration, executables with their architectures, archives with their file counts, databases, PDFs, text with its lines and encoding), both sizes in blocks, every date and how long ago, links, inode, flags, extended attributes with the quarantine decoded, the volume and, on request, its SHA-256.

What takes the space, and how old it is

By kind: images, video, audio, documents, code, data, archives, disk images, programs, fonts, and the biggest extensions. By age: today, this week, this month, up to over 5 years. By size: from empty to over 4G. Three tables with the same columns and a bar against the biggest row.

The biggest files anywhere

The 20 heaviest files inside the items (or any number), with their dates, sizes, share of the total and path. A folder that is mostly one kind of file says so in the list: mostly video, mostly code.

Fast on purpose

Many folders are read at the same time, and on macOS the sizes of a whole folder come back in one system call instead of one per file: 2 to 4 times faster than du.

Fits the window

Only the columns that fit are shown, the least important leaving first, and the notes are shortened to the width. Numbers stay plain; the only colour that follows the size is the bar. --min folds the items smaller than a size or a share into one line.

JSON for everything

-j writes any view but the map as JSON, with the same facts as the screen: sizes in bytes, dates in RFC 3339, snake_case names. inspector -j movie.mp4 | jq .details

Made for pipes too

Without a terminal there is no progress line, no header, no bar and no colour, so the output goes cleanly into other commands; -s leaves only the size and the name, -b writes exact byte counts, and a file with several hard links counts once.

It reads sizes, and opens a file only to describe it.

inspector looks at what the system says about each item (names, sizes, dates, owners, permissions, flags, attributes). The card is the only view that opens a file, and only the one it describes: its first bytes to tell what it is, the whole of it only with --hash. Nothing is written, and it reaches the network only when you run inspector --update.

  • No accounts, no servers, no telemetry
  • Works offline
  • No settings file, nothing written to disk

इंस्टॉल करें

macOS

brew tap leonardoaguiar/inspector https://leonardoaguiar.com/apps/inspector/tap.git
brew install leonardoaguiar/inspector/inspector

Apple silicon or Intel, with Homebrew. brew upgrade or inspector --update brings new versions.

Linux

curl -fsSL https://leonardoaguiar.com/apps/inspector/install.sh | sh

Any distribution, x86_64 or ARM. inspector --update, or running it again, updates.

Android

curl -fsSL https://leonardoaguiar.com/apps/inspector/install.sh | sh

In Termux, on a 64-bit phone or tablet. inspector --update, or running it again, updates.

Windows

curl -fsSL https://leonardoaguiar.com/apps/inspector/install.sh | sh

Inside WSL (Ubuntu, Debian...). inspector --update, or running it again, updates.

ज़रूरतें

System
macOS, Linux or Android (Termux); Windows through WSL
Runs in
Any terminal
Install
Homebrew on macOS, one command elsewhere
Updates
brew upgrade, inspector --update, or the same command again
Size
About 7 MB
License
MIT
Price
Free

सवाल

How is it different from ls -lh?

ls shows a folder as the few bytes of its own entry. inspector measures everything inside it, so a folder shows the space it really takes.

And from du?

It gives the same numbers as du, for everything in the folder at once, sorted and coloured, with a progress line while it measures, and then lets you look at them as a tree, a map or by kind, age and size. On macOS it is 2 to 4 times faster.

And from file and stat?

The card puts together what file says (the kind, read from the bytes, with the dimensions, duration or architectures), what stat says (sizes, dates, mode, inode, flags) and what neither says (the extended attributes decoded, the volume, how long ago), for a file or a whole folder.

What is the map?

A treemap: every item is a rectangle whose area is its share of the total, so the biggest things on the disk are the biggest boxes on the screen, the heaviest at the top left.

Does -y open the files to tell their kind?

No. The breakdown by kind goes by the file names, on the same pass that measures the sizes. Only the card opens a file, and only the one it describes.

Why does a tiny file show 4.0K?

That is the space it takes on disk, which comes in whole blocks. inspector -a shows the bytes in the file instead.

What does (N unreadable) mean?

Some folders or files inside could not be read, usually for lack of permission, and the size shown is what could be read. sudo inspector reads everything.

Does it go online?

Only when you run inspector --update. Nothing else in it touches the network.

Does it run on Android?

Yes, in Termux, on 64-bit phones and tablets.

And on Windows?

Inside WSL, the same as on Linux. There is no native Windows version.

गोपनीयता · सेवा की शर्तें