
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
A powerful command-line disk utility for macOS with emoji-enhanced output, SSD/HDD detection, and external drive support
The ultimate command-line disk utility for macOS - Get detailed disk information, monitor storage usage, and manage your drives with beautiful emoji-enhanced output.
dysk-mac is a powerful command-line disk utility for macOS that provides detailed information about mounted disks, including usage statistics, disk types (SSD vs HDD), external drive detection, and beautiful emoji-enhanced output.
# Install with Homebrew
brew tap nudelx/dysk-mac
brew install dysk-mac
# Run the tool
dysk-mac
diskutil
and df
commands for maximum compatibilityInstall via Homebrew tap:
brew tap nudelx/dysk-mac
brew install dysk-mac
npm install
chmod +x index.js
npm link
Display all mounted disks in a formatted table:
./index.js
# or if globally linked:
dysk-mac
Option | Description | Example |
---|---|---|
--json | Output as JSON format | dysk-mac --json |
--csv | Output as CSV format | dysk-mac --csv |
--filter | Filter disks using expressions | dysk-mac --filter "usedPercent > 80" |
--sort | Sort by disk property | dysk-mac --sort free |
dysk-mac
Output:
┌────────────────┬────────────────────────────┬───────────┬───────────┬────────┬───────────┬──────┬──────────┐
│ Disk │ Mount │ Size (GB) │ Used (GB) │ Used % │ Free (GB) │ Type │ External │
├────────────────┼────────────────────────────┼───────────┼───────────┼────────┼───────────┼──────┼──────────┤
│ /dev/disk3s1s1 │ / │ 460.4 │ 10.5 │ 5% │ 249.9 │ HDD │ No │
│ /dev/disk3s6 │ /System/Volumes/VM │ 460.4 │ 0.0 │ 1% │ 249.9 │ HDD │ No │
│ /dev/disk3s5 │ /System/Volumes/Data │ 460.4 │ 192.3 │ 44% │ 249.9 │ HDD │ No │
└────────────────┴────────────────────────────┴───────────┴───────────┴────────┴───────────┴──────┴──────────┘
Show only disks with more than 70% usage:
dysk-mac --filter "usedPercent > 70"
Display disks sorted by available free space (largest first):
dysk-mac --sort free
Get machine-readable JSON format:
dysk-mac --json
Output:
[
{
"filesystem": "/dev/disk1s1",
"size": 500107862016,
"used": 375080869888,
"free": 125026992128,
"usedPercent": 75,
"mount": "/",
"type": "SSD",
"removable": false,
"external": false
}
]
Export data for spreadsheet analysis:
dysk-mac --csv
Find external drives with low free space, sorted by usage:
dysk-mac --filter "external && free < 50e9" --sort usedPercent
The --filter
option accepts JavaScript expressions that can reference any disk property:
Property | Description | Example |
---|---|---|
usedPercent | Percentage of disk used | usedPercent > 80 |
free | Free space in bytes | free < 10e9 (less than 10GB) |
size | Total disk size in bytes | size > 500e9 (larger than 500GB) |
external | Boolean for external drives | external (only external drives) |
type | Disk type ("SSD" or "HDD") | type === "SSD" |
removable | Boolean for removable media | removable |
# Show only SSDs with high usage
dysk-mac --filter "type === 'SSD' && usedPercent > 90"
# Show external drives with less than 20GB free
dysk-mac --filter "external && free < 20e9"
# Show non-system drives (not mounted at /)
dysk-mac --filter "mount !== '/'"
# Show drives with more than 1TB total size
dysk-mac --filter "size > 1e12"
Field | Description |
---|---|
Disk | Device path (e.g., /dev/disk1s1 ) |
Mount | Mount point (e.g., / , /Volumes/Data ) |
Size (GB) | Total disk size in gigabytes |
Used (GB) | Used space in gigabytes |
Used % | Percentage of disk space used |
Free (GB) | Available space in gigabytes |
Type | Disk type: SSD or HDD |
External | Whether the drive is external (Yes/No) |
diskutil
and df
commands)cli-table3
: For formatted table outputyargs
: For command-line argument parsingMIT License - feel free to use and modify as needed.
If you get permission errors, ensure the script is executable:
chmod +x index.js
If no disks are shown, check that you have mounted disks and the script has permission to run diskutil
commands.
Make sure your filter expression is valid JavaScript. Common issues:
&&
for AND, ||
for OR===
for exact equalitye9
for GB, e12
for TB)To make this tool available via Homebrew, see HOMEBREW_SETUP.md
for detailed instructions.
Quick setup:
./setup-homebrew.sh
git clone https://github.com/nudelx/dysk-mac.git
cd dysk-mac
npm install
chmod +x index.js
./index.js
dysk-mac is optimized for these search terms:
Made with ❤️ for the macOS community
FAQs
A powerful command-line disk utility for macOS with emoji-enhanced output, SSD/HDD detection, and external drive support
The npm package dysk-mac receives a total of 2 weekly downloads. As such, dysk-mac popularity was classified as not popular.
We found that dysk-mac demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.