{"skill":{"slug":"x-df","displayName":"x-df","summary":"Enhanced `df` combining disk usage and mount info. Supports CSV, TSV, and TUI with filesystem type detection. **Dependency**: This is an x-cmd module. Instal...","description":"---\nname: x-df\ndescription: |\n  Enhanced `df` combining disk usage and mount info. \n  Supports CSV, TSV, and TUI with filesystem type detection.\n  \n  **Dependency**: This is an x-cmd module. Install x-cmd first (see x-cmd skill for installation options).\n\nlicense: Apache-2.0\ncompatibility: POSIX Shell\n\nmetadata:\n  author: Li Junhao\n  version: \"1.0.2\"\n  category: x-cmd-extension\n  tags: [x-cmd, system, df, disk, storage]\n---\n\n# x df - Disk Free Space Viewer\n\n> Enhanced `df` command combining `df` and `mount` output with multiple formats.\n\n---\n\n## Quick Start\n\n```bash\n# Interactive disk usage viewer (default in TTY)\nx df\n\n# TSV format output (default when piped)\nx df | cat\n```\n\n---\n\n## Features\n\n- **Joint output**: Combines `df` and `mount` command information\n- **Multi-format**: TSV, CSV, TUI application, raw\n- **Cross-platform**: Linux, macOS, Windows support\n- **Auto-detection**: Interactive mode in TTY, TSV when piped\n\n---\n\n## Output Fields\n\n### Linux / Windows\n\n| Field | Description | Example |\n|-------|-------------|---------|\n| `Filesystem` | Device path | `/dev/sda1` |\n| `Type` | Filesystem type | `ext4`, `ntfs` |\n| `Size` | Total size | `500G` |\n| `Used` | Used space | `200G` |\n| `Avail` | Available space | `300G` |\n| `Use%` | Usage percentage | `40%` |\n| `Mounted_path` | Mount point | `/`, `/home` |\n| `Mounted_attr` | Mount attributes | `rw,relatime` |\n\n### macOS (additional fields)\n\n| Field | Description | Example |\n|-------|-------------|---------|\n| `Capacity` | Capacity percentage | `40%` |\n| `iused` | Used inodes | `1000000` |\n| `ifree` | Free inodes | `9000000` |\n| `%iused` | Inode usage % | `10%` |\n\n---\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| `x df` | Auto mode: TTY→interactive, pipe→TSV |\n| `x df --app` | Interactive TUI view |\n| `x df --csv` | CSV format output |\n| `x df --tsv` | TSV format output |\n| `x df --raw` | Raw system command output |\n| `x df --numeric` | Display sizes in pure numeric form |\n\n---\n\n## Examples\n\n### Basic Usage\n\n```bash\n# Interactive view (TTY)\nx df\n\n# TSV format\nx df --tsv\n\n# CSV format\nx df --csv\n```\n\n### Filter and Process\n\n```bash\n# Find large filesystems (>100GB)\nx df --tsv | awk -F'\\t' 'NR>1 && $3 > 100'\n\n# Check specific mount point\nx df --tsv | grep \"/home\"\n\n# Get usage percentages only\nx df --tsv | awk -F'\\t' '{print $1, $6}'\n```\n\n### Data Processing\n\n```bash\n# Convert to JSON via csv\nx df --csv | x csv tojson\n\n# SQL-like query on disk usage\nx df --csv | x csv sql \"SELECT * WHERE Use% > 80\"\n```\n\n---\n\n## Platform Notes\n\n### Linux\n- Uses `df` and `/proc/mounts` or `mount` command\n- Full feature support\n\n### macOS\n- Uses `df` and `mount` command\n- Additional inode information (iused, ifree, %iused)\n\n### Windows\n- Uses `wmic` or PowerShell `Get-Volume` for disk info\n- Full feature support\n\n---\n\n## Comparison with Native df\n\n| Command | Output |\n|---------|--------|\n| `df -h` | Basic disk usage |\n| `mount` | Mount information |\n| `x df` | Combined view with filesystem type and mount attributes |\n\n```bash\n# Native df\n$ df -h\nFilesystem      Size  Used Avail Use% Mounted on\n/dev/sda1       500G  200G  300G  40% /\n\n# x df (combined with mount info)\n$ x df --tsv\nFilesystem    Type    Size    Used    Avail   Use%    Mounted_path    Mounted_attr\n/dev/sda1     ext4    500G    200G    300G    40%     /               rw,relatime\n```\n\n---\n\n## Related\n\n- Native `df(1)` manual page\n- Native `mount(8)` manual page\n","tags":{"latest":"1.0.2"},"stats":{"comments":0,"downloads":579,"installsAllTime":1,"installsCurrent":1,"stars":1,"versions":3},"createdAt":1773185309350,"updatedAt":1778491816516},"latestVersion":{"version":"1.0.2","createdAt":1773185788247,"changelog":"- Updated dependency note: clarified x-cmd must be installed first, with reference to the x-cmd skill for installation options.\n- Windows backend description updated: specifies use of `wmic` or PowerShell `Get-Volume` for disk info.\n- Metadata version bump to 1.0.2.","license":"MIT-0"},"metadata":null,"owner":{"handle":"edwinjhlee","userId":"s172788nc0txsvg12nzarvtzf183gq1h","displayName":"Edwin.JH.Lee","image":"https://avatars.githubusercontent.com/u/4426319?v=4"},"moderation":null}