Coder Social home page Coder Social logo

duf's Introduction

duf

Latest Release Go Doc Software License Build Status Go ReportCard

Disk Usage/Free Utility (Linux, BSD, macOS & Windows)

duf

Features

  • User-friendly, colorful output
  • Adjusts to your terminal's theme & width
  • Sort the results according to your needs
  • Groups & filters devices
  • Can conveniently output JSON

Installation

Packages

Linux

  • Arch Linux: pacman -S duf
  • Ubuntu 22.04 / Debian unstable: apt install duf
  • Nix: nix-env -iA nixpkgs.duf
  • Void Linux: xbps-install -S duf
  • Gentoo Linux: emerge sys-fs/duf
  • Packages in Alpine, Debian & RPM formats

BSD

  • FreeBSD: pkg install duf
  • OpenBSD: pkg_add duf

macOS

  • with Homebrew: brew install duf
  • with MacPorts: sudo port selfupdate && sudo port install duf

Windows

Android

  • Android (via termux): pkg install duf

Binaries

  • Binaries for Linux, FreeBSD, OpenBSD, macOS, Windows

From source

Make sure you have a working Go environment (Go 1.17 or higher is required). See the install instructions.

Compiling duf is easy, simply run:

git clone https://github.com/muesli/duf.git
cd duf
go build

Usage

You can simply start duf without any command-line arguments:

duf

If you supply arguments, duf will only list specific devices & mount points:

duf /home /some/file

If you want to list everything (including pseudo, duplicate, inaccessible file systems):

duf --all

Filtering

You can show and hide specific tables:

duf --only local,network,fuse,special,loops,binds
duf --hide local,network,fuse,special,loops,binds

You can also show and hide specific filesystems:

duf --only-fs tmpfs,vfat
duf --hide-fs tmpfs,vfat

...or specific mount points:

duf --only-mp /,/home,/dev
duf --hide-mp /,/home,/dev

Wildcards inside quotes work:

duf --only-mp '/sys/*,/dev/*'

Display options

Sort the output:

duf --sort size

Valid keys are: mountpoint, size, used, avail, usage, inodes, inodes_used, inodes_avail, inodes_usage, type, filesystem.

Show or hide specific columns:

duf --output mountpoint,size,usage

Valid keys are: mountpoint, size, used, avail, usage, inodes, inodes_used, inodes_avail, inodes_usage, type, filesystem.

List inode information instead of block usage:

duf --inodes

If duf doesn't detect your terminal's colors correctly, you can set a theme:

duf --theme light

Color-coding & Thresholds

duf highlights the availability & usage columns in red, green, or yellow, depending on how much space is still available. You can set your own thresholds:

duf --avail-threshold="10G,1G"
duf --usage-threshold="0.5,0.9"

Bonus

If you prefer your output as JSON:

duf --json

Troubleshooting

Users of oh-my-zsh should be aware that it already defines an alias called duf, which you will have to remove in order to use duf:

unalias duf

Feedback

Got some feedback or suggestions? Please open an issue or drop me a note!

duf's People

Contributors

actions-user avatar alerque avatar ansrivas avatar batkiz avatar daphipz avatar dean-coakley avatar dependabot[bot] avatar fvcr avatar goggle avatar hem-brahmbhatt avatar herbygillot avatar huangnauh avatar idsulik avatar iglou-eu avatar julian-klode avatar kcubeterm avatar meowgorithm avatar mrmagic223325 avatar mrngm avatar muesli avatar raisedadead avatar rangercd avatar rossdeane avatar seththeriault avatar srobinson avatar sschne avatar taigrr avatar trim21 avatar xzfc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

duf's Issues

Can't tap repository on MacOs with Homebrew

Hi guys,

While acting according to https://github.com/muesli/duf/blame/master/README.md#L34 and trying to install tool with Homebrew on MacOs, can't do that as

brew tap muesli/tap                    
Updating Homebrew...
==> Tapping muesli/tap
Cloning into '/usr/local/Homebrew/Library/Taps/muesli/homebrew-tap'...
remote: Enumerating objects: 45, done.
remote: Counting objects: 100% (45/45), done.
remote: Compressing objects: 100% (43/43), done.
remote: Total 45 (delta 20), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (45/45), 7.21 KiB | 2.40 MiB/s, done.
Resolving deltas: 100% (20/20), done.
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/muesli/homebrew-tap/deckmaster.rb
formulae require at least a URL
Error: Cannot tap muesli/tap: invalid syntax in tap!

at MacOs 10.15.7 && Homebrew 2.5.9

Add label to "USE%" column headers

When displaying both drive and inode usage bars they are both titled "USE%". It'd be helpful if they included a label such as "DEVICE USE%" and "INODE USE%".

.deb format

Hi,
I'm starting to setup duf into https://packages.azlux.fr/ .
I face one issue. The .deb provide with the release aren't in a good format.

root@packages:~/maj.d$ reprepro -b /var/www/repos/apt/debian includedeb buster /tmp/duf.deb
Missing ar header '!<arch>' at the beginning of /tmp/duf.deb
There have been errors!

root@packages:~/maj.d$ dpkg-deb -c /tmp/duf.deb
dpkg-deb: error: '/tmp/duf.deb' is not a Debian format archive

How do you build your .deb ?
Az

NTFS not detected when mounted via gui

I have an ntfs partition mounted that is detected as "fuseblk" and nothing further. I'd expect duf to recognize NTFS here. lsblk reports it as ntfs correctly. I mounted it using nautilus in gnome-shell.

-hide binds not working

Running duf from source as at 2nd November 2020 commit eefe880.

I have several bind mounts created by mount --bind <sourcepath> <mountpath> -o noexec,nosuid. When I run duf -hide binds these both show up in the output.

Broken output on 80 column terminal

A default Terminal on XFCE opens with a 80 char width, which leads to a somewhat broken output:

2020-09-21-160443_814x554_scrot

I guess on terminals that aren't wide enough, it would make sense to skip columns (probably the bar chart first) or shorten paths.

macOS 10.15.6 panic: runtime error: makeslice: cap out of range

I know nothing about golang but here's the stack track:

pear:Movies xarph$ duf
panic: runtime error: makeslice: cap out of range

goroutine 1 [running]:
strings.(*Builder).grow(...)
	/usr/lib/go/src/strings/builder.go:68
strings.(*Builder).Grow(...)
	/usr/lib/go/src/strings/builder.go:82
strings.Repeat(0x115d2d1, 0x1, 0x3677d46cef821200, 0x115d2d0, 0x1)
	/usr/lib/go/src/strings/strings.go:536 +0x47b
main.barTransformer(0x1134220, 0xc00012abd0, 0xc00015e708, 0xc00010f6c0)
	/home/muesli/Sources/go/src/github.com/muesli/duf/table.go:172 +0x172
github.com/jedib0t/go-pretty/v6/table.(*Table).analyzeAndStringify(0xc00017c000, 0xc000145180, 0x13, 0x13, 0x0, 0x0, 0x0, 0x0, 0xc0001c0280, 0x13, ...)
	/home/muesli/Sources/go/pkg/mod/github.com/jedib0t/go-pretty/[email protected]/table/table.go:314 +0x570
github.com/jedib0t/go-pretty/v6/table.(*Table).initForRenderRowsStringify(0xc00017c000, 0xc000126180, 0xe, 0x10, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, ...)
	/home/muesli/Sources/go/pkg/mod/github.com/jedib0t/go-pretty/[email protected]/table/table.go:724 +0xf8
github.com/jedib0t/go-pretty/v6/table.(*Table).initForRenderRows(0xc00017c000)
	/home/muesli/Sources/go/pkg/mod/github.com/jedib0t/go-pretty/[email protected]/table/table.go:704 +0x205
github.com/jedib0t/go-pretty/v6/table.(*Table).initForRender(0xc00017c000)
	/home/muesli/Sources/go/pkg/mod/github.com/jedib0t/go-pretty/[email protected]/table/table.go:563 +0x47
github.com/jedib0t/go-pretty/v6/table.(*Table).Render(0xc00017c000, 0xc00011a140, 0x1)
	/home/muesli/Sources/go/pkg/mod/github.com/jedib0t/go-pretty/[email protected]/table/render.go:22 +0x45
main.printTable(0x115d882, 0x5, 0xc0001a6000, 0xe, 0x11, 0x1, 0xc000161ec0, 0x7, 0x7)
	/home/muesli/Sources/go/src/github.com/muesli/duf/table.go:139 +0x13e5
main.renderTables(0xc00019c000, 0x10, 0x11, 0xc000161ec0, 0x7, 0x7, 0x1, 0x0, 0x4a)
	/home/muesli/Sources/go/src/github.com/muesli/duf/main.go:78 +0x19b
main.main()
	/home/muesli/Sources/go/src/github.com/muesli/duf/main.go:184 +0x5b1

I installed it through homebrew.

pear:Movies xarph$ brew install muesli/homebrew-tap/duf
Updating Homebrew...
==> Auto-updated Homebrew!
Updated Homebrew from d9416d762a to 9fbe13c17d.
Updated 3 taps (homebrew/cask-versions, homebrew/core and homebrew/cask).
==> New Formulae
leaf                                           rustscan                                       vivid                                          webify
==> Updated Formulae
Updated 130 formulae.
==> New Casks
anka-build-cloud-registry             archi                                 craft                                 eudic-es                              multi
anka-virtualization                   cernbox                               ditto                                 loni-pipeline
==> Updated Casks

<bunch of crap omitted>

==> Tapping muesli/tap
Cloning into '/usr/local/Homebrew/Library/Taps/muesli/homebrew-tap'...
remote: Enumerating objects: 18, done.
remote: Counting objects: 100% (18/18), done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 18 (delta 6), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (18/18), 2.74 KiB | 175.00 KiB/s, done.
Tapped 4 formulae (45 files, 31.9KB).
==> Installing duf from muesli/tap
==> Downloading https://github.com/muesli/duf/releases/download/v0.3.0/duf_0.3.0_Darwin_x86_64.tar.gz
==> Downloading from https://github-production-release-asset-2e65be.s3.amazonaws.com/297165998/5ed0e080-fee3-11ea-897b-cbb1bbdca0a8?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIW
######################################################################## 100.0%
🍺  /usr/local/Cellar/duf/0.3.0: 5 files, 2.5MB, built in 8 seconds

Weird input to next command line

I just updated duf from 0.4 to 0.5 and noticed that on some computers after duf has printed its output and the shell prompt is shown, the sequence "11;rgb:0000/0000/0000" is "output" on the terminal, but as part of the next command (so the shell takes it as input, making a mess for next command).

$ duf
...
$ 11;rgb:0000/0000/0000?

(output cut because even if using the code tags the output is messed up in github)

Googling for "11;rgb:0000/0000/0000" seems to indicate that some color detection causes the terminal emulator to spit that out. I think it may have to do with the detection of the background color.

Note that not all terminals do that. I mean, I only use lxterminal, but depending on where I run duf in some servers it works OK, in others it outputs that string. Could be some timing issue.

ascii graphics for non-UTF terminals

I do understand this is not something common nowadays but I still have a few servers I maintain that have no UTF support in console. Hence with a little hope I'd like to ask for support for non-UTF terminals by using ascii graphics instead of UTF symbols. Thanks in advance.
image

Show stats about specific path(s) only

First of all thanks for the great tool. As I'm using it relatively often I'd like to ask for a feature to be implemented if this fits duf ideology: would be pretty useful to be able to pass a path to duf to show stats on this path only (just like df does).

> df -h /
Filesystem         Size    Used   Avail Capacity  Mounted on
/dev/gpt/rootfs     58G     45G    8,3G    84%    /
``
Passing path to `duf` doesn't change output and `duf` shows stats about all available mounts.

Thanks in advance

"permission denied" on Ubuntu 18.04 with LXD installed using Snap

On my LXD server, installed using Snap, duf first output are errors

/var/snap/lxd/common/ns/shmounts: permission denied
/var/snap/lxd/common/ns/mntns: permission denied

The rest of the output is fine.

duf_lxd

The relevant part of /proc/self/mountinfo is

764 92 0:117 / /var/snap/lxd/common/ns rw,relatime - tmpfs tmpfs rw,size=1024k,mode=700
778 764 0:3 mnt:[4026532660] /var/snap/lxd/common/ns/shmounts rw - nsfs nsfs rw
751 764 0:3 mnt:[4026532657] /var/snap/lxd/common/ns/mntns rw - nsfs nsfs rw

Edit: It is duf commit 02d3bac but it was already the case when I tried yesterday.

bash/zsh command line completion

Would be super great to have bash/zsh completion (to complete mount paths and to complete command line args and their respective values) bundled into a duf binary to be used like (bash example) complete -C /usr/local/bin/dif duf.
Thanks in advance.

-width is inaccurate

If I use autodetection (the default), or specify my -width to the actual terminal width, duf will wrap before it uses the full width of the terminal. However, if I specify a width much larger than the terminal, the output is fine and still (in this case) fits within the terminal.

In other words, the width seems to be internally scaled to a smaller value than the terminal actually is.

Windows Support Roadmap

This issue is a tracker for Windows support development.


Todo

Done

  • Support Windows local devices #58
  • Support network attached devices, such as SMB #58
  • Support block attributes in Mount struct (which should be equivalent to "cluster" for Windows) #58
  • Recognize Windows Sandbox device as a special device #58
  • Support for code pages other than 437(United States) or 65001(UTF-8) #63

Add a flag to print out version

Usually "-v" would work.
It could be also useful to print out version with "-h" (that said -h often means "human readable")

Ignore snaps by default

So duf currently shows 53 squashfs mounts for snaps that should be ignored:

╭──────────────────────────────────────────────────────────────────────────╮
│ 62 local devices                                                         │
├──────────────┬────────┬────────┬────────┬────────┬────────┬──────────────┤
│ MOUNTED ON   │   SIZE │   USED │  AVAIL │  USE%  │ TYPE   │ FILESYSTEM   │
├──────────────┼────────┼────────┼────────┼────────┼────────┼──────────────┤
│ /            │  31.0G │  28.3G │   2.2G │  91.3% │ btrfs  │ /dev/ubuntu- │
│              │        │        │        │        │        │ -vg/root     │
│ /boot        │ 704.5M │ 229.2M │ 424.0M │  32.5% │ ext4   │ /dev/nvme0n1 │
│              │        │        │        │        │        │ p2           │
│ /boot/efi    │ 511.0M │  21.1M │ 489.9M │   4.1% │ vfat   │ /dev/nvme0n1 │
│              │        │        │        │        │        │ p1           │
│ /home        │ 170.0G │ 159.3G │  10.7G │  93.7% │ xfs    │ /dev/ubuntu- │
│              │        │        │        │        │        │ -vg/home     │
│ /mnt         │  31.0G │  28.3G │   2.2G │  91.3% │ btrfs  │ /dev/ubuntu- │
│              │        │        │        │        │        │ -vg/root     │
│ /snap/charm/ │ 111.5M │ 111.5M │     0B │ 100.0% │ squash │ /dev/loop0   │
│ 557          │        │        │        │        │ fs     │              │
│ /snap/charm/ │ 111.5M │ 111.5M │     0B │ 100.0% │ squash │ /dev/loop1   │
│ 562          │        │        │        │        │ fs     │              │
│ /snap/code/4 │ 142.4M │ 142.4M │     0B │ 100.0% │ squash │ /dev/loop2   │
│ 9            │        │        │        │        │ fs     │              │
│ /snap/code/5 │ 146.1M │ 146.1M │     0B │ 100.0% │ squash │ /dev/loop4   │
│ 0            │        │        │        │        │ fs     │              │
│ /snap/core/1 │  98.0M │  98.0M │     0B │ 100.0% │ squash │ /dev/loop5   │
│ 0402         │        │        │        │        │ fs     │              │
│ /snap/core/1 │  97.9M │  97.9M │     0B │ 100.0% │ squash │ /dev/loop7   │
│ 0444         │        │        │        │        │ fs     │              │
│ /snap/core18 │  55.4M │  55.4M │     0B │ 100.0% │ squash │ /dev/loop8   │
│ /1885        │        │        │        │        │ fs     │              │
│ /snap/core18 │  55.4M │  55.4M │     0B │ 100.0% │ squash │ /dev/loop38  │
│ /1932        │        │        │        │        │ fs     │              │
│ /snap/core20 │  61.0M │  61.0M │     0B │ 100.0% │ squash │ /dev/loop19  │
│ /634         │        │        │        │        │ fs     │              │
│ /snap/core20 │  61.6M │  61.6M │     0B │ 100.0% │ squash │ /dev/loop52  │
│ /875         │        │        │        │        │ fs     │              │
│ /snap/events │ 128.0K │ 128.0K │     0B │ 100.0% │ squash │ /dev/loop32  │
│ tat/160      │        │        │        │        │ fs     │              │
│ /snap/events │ 128.0K │ 128.0K │     0B │ 100.0% │ squash │ /dev/loop6   │
│ tat/166      │        │        │        │        │ fs     │              │
│ /snap/firefo │ 160.0M │ 160.0M │     0B │ 100.0% │ squash │ /dev/loop16  │
│ x/454        │        │        │        │        │ fs     │              │
│ /snap/firefo │ 160.4M │ 160.4M │     0B │ 100.0% │ squash │ /dev/loop41  │
│ x/457        │        │        │        │        │ fs     │              │
│ /snap/git-ub │ 110.8M │ 110.8M │     0B │ 100.0% │ squash │ /dev/loop17  │
│ untu/470     │        │        │        │        │ fs     │              │
│ /snap/git-ub │ 113.0M │ 113.0M │     0B │ 100.0% │ squash │ /dev/loop30  │
│ untu/474     │        │        │        │        │ fs     │              │
│ /snap/gnome- │ 140.8M │ 140.8M │     0B │ 100.0% │ squash │ /dev/loop20  │
│ 3-26-1604/10 │        │        │        │        │ fs     │              │
│ 0            │        │        │        │        │        │              │
│ /snap/gnome- │ 140.8M │ 140.8M │     0B │ 100.0% │ squash │ /dev/loop11  │
│ 3-26-1604/98 │        │        │        │        │ fs     │              │
│ /snap/gnome- │ 161.5M │ 161.5M │     0B │ 100.0% │ squash │ /dev/loop10  │
│ 3-28-1804/12 │        │        │        │        │ fs     │              │
│ 8            │        │        │        │        │        │              │
│ /snap/gnome- │ 162.9M │ 162.9M │     0B │ 100.0% │ squash │ /dev/loop25  │
│ 3-28-1804/14 │        │        │        │        │ fs     │              │
│ 5            │        │        │        │        │        │              │
│ /snap/gnome- │ 255.6M │ 255.6M │     0B │ 100.0% │ squash │ /dev/loop12  │
│ 3-34-1804/36 │        │        │        │        │ fs     │              │
│ /snap/gnome- │ 218.0M │ 218.0M │     0B │ 100.0% │ squash │ /dev/loop15  │
│ 3-34-1804/60 │        │        │        │        │ fs     │              │
│ /snap/go/672 │  91.2M │  91.2M │     0B │ 100.0% │ squash │ /dev/loop14  │
│ 7            │        │        │        │        │ fs     │              │
│ /snap/go/674 │  91.2M │  91.2M │     0B │ 100.0% │ squash │ /dev/loop29  │
│ 5            │        │        │        │        │ fs     │              │
│ /snap/gtk-co │  64.4M │  64.4M │     0B │ 100.0% │ squash │ /dev/loop22  │
│ mmon-themes/ │        │        │        │        │ fs     │              │
│ 1513         │        │        │        │        │        │              │
│ /snap/gtk-co │  64.9M │  64.9M │     0B │ 100.0% │ squash │ /dev/loop35  │
│ mmon-themes/ │        │        │        │        │ fs     │              │
│ 1514         │        │        │        │        │        │              │
│ /snap/hledge │  17.8M │  17.8M │     0B │ 100.0% │ squash │ /dev/loop47  │
│ r-jak/2      │        │        │        │        │ fs     │              │
│ /snap/hledge │  17.8M │  17.8M │     0B │ 100.0% │ squash │ /dev/loop49  │
│ r/x1         │        │        │        │        │ fs     │              │
│ /snap/hledge │  29.2M │  29.2M │     0B │ 100.0% │ squash │ /dev/loop13  │
│ r/x2         │        │        │        │        │ fs     │              │
│ /snap/hugo/9 │  33.4M │  33.4M │     0B │ 100.0% │ squash │ /dev/loop9   │
│ 404          │        │        │        │        │ fs     │              │
│ /snap/hugo/9 │  33.4M │  33.4M │     0B │ 100.0% │ squash │ /dev/loop36  │
│ 478          │        │        │        │        │ fs     │              │
│ /snap/juju/1 │  69.2M │  69.2M │     0B │ 100.0% │ squash │ /dev/loop31  │
│ 4356         │        │        │        │        │ fs     │              │
│ /snap/juju/1 │  69.2M │  69.2M │     0B │ 100.0% │ squash │ /dev/loop27  │
│ 4498         │        │        │        │        │ fs     │              │
│ /snap/lxd/18 │  69.9M │  69.9M │     0B │ 100.0% │ squash │ /dev/loop33  │
│ 520          │        │        │        │        │ fs     │              │
│ /snap/lxd/18 │  71.4M │  71.4M │     0B │ 100.0% │ squash │ /dev/loop53  │
│ 546          │        │        │        │        │ fs     │              │
│ /snap/matter │  29.4M │  29.4M │     0B │ 100.0% │ squash │ /dev/loop43  │
│ horn/79      │        │        │        │        │ fs     │              │
│ /snap/matter │  29.4M │  29.4M │     0B │ 100.0% │ squash │ /dev/loop3   │
│ horn/83      │        │        │        │        │ fs     │              │
│ /snap/mojo/1 │ 155.1M │ 155.1M │     0B │ 100.0% │ squash │ /dev/loop18  │
│ 21           │        │        │        │        │ fs     │              │
│ /snap/mojo/1 │ 155.2M │ 155.2M │     0B │ 100.0% │ squash │ /dev/loop23  │
│ 25           │        │        │        │        │ fs     │              │
│ /snap/multip │ 219.2M │ 219.2M │     0B │ 100.0% │ squash │ /dev/loop21  │
│ ass/3003     │        │        │        │        │ fs     │              │
│ /snap/multip │ 219.2M │ 219.2M │     0B │ 100.0% │ squash │ /dev/loop48  │
│ ass/3020     │        │        │        │        │ fs     │              │
│ /snap/riseup │  43.4M │  43.4M │     0B │ 100.0% │ squash │ /dev/loop46  │
│ -vpn/159     │        │        │        │        │ fs     │              │
│ /snap/riseup │  43.4M │  43.4M │     0B │ 100.0% │ squash │ /dev/loop37  │
│ -vpn/161     │        │        │        │        │ fs     │              │
│ /snap/snap-s │  49.9M │  49.9M │     0B │ 100.0% │ squash │ /dev/loop39  │
│ tore/467     │        │        │        │        │ fs     │              │
│ /snap/snap-s │  51.1M │  51.1M │     0B │ 100.0% │ squash │ /dev/loop24  │
│ tore/498     │        │        │        │        │ fs     │              │
│ /snap/snapcr │  67.9M │  67.9M │     0B │ 100.0% │ squash │ /dev/loop34  │
│ aft/5756     │        │        │        │        │ fs     │              │
│ /snap/snapcr │  67.9M │  67.9M │     0B │ 100.0% │ squash │ /dev/loop50  │
│ aft/5793     │        │        │        │        │ fs     │              │
│ /snap/spotif │ 169.4M │ 169.4M │     0B │ 100.0% │ squash │ /dev/loop42  │
│ y/42         │        │        │        │        │ fs     │              │
│ /snap/spotif │ 173.0M │ 173.0M │     0B │ 100.0% │ squash │ /dev/loop45  │
│ y/43         │        │        │        │        │ fs     │              │
│ /snap/syncth │   7.2M │   7.2M │     0B │ 100.0% │ squash │ /dev/loop44  │
│ ing/498      │        │        │        │        │ fs     │              │
│ /snap/syncth │   7.2M │   7.2M │     0B │ 100.0% │ squash │ /dev/loop26  │
│ ing/501      │        │        │        │        │ fs     │              │
│ /snap/zoom-c │ 231.4M │ 231.4M │     0B │ 100.0% │ squash │ /dev/loop40  │
│ lient/113    │        │        │        │        │ fs     │              │
│ /snap/zoom-c │ 233.2M │ 233.2M │     0B │ 100.0% │ squash │ /dev/loop28  │
│ lient/118    │        │        │        │        │ fs     │              │
│ /srv/lxd     │  30.0G │  15.7G │  13.5G │  52.3% │ btrfs  │ /dev/ubuntu- │
│              │        │        │        │        │        │ -vg/lxd      │
│ /var/cache/a │  31.0G │  28.3G │   2.2G │  91.3% │ btrfs  │ /dev/ubuntu- │
│ pt/archives  │        │        │        │        │        │ -vg/root     │
│ /var/cache/s │  31.0G │  28.3G │   2.2G │  91.3% │ btrfs  │ /dev/ubuntu- │
│ quid-deb-pro │        │        │        │        │        │ -vg/root     │
│ xy           │        │        │        │        │        │              │
│ /var/log     │  31.0G │  28.3G │   2.2G │  91.3% │ btrfs  │ /dev/ubuntu- │
│              │        │        │        │        │        │ -vg/root     │
╰──────────────┴────────┴────────┴────────┴────────┴────────┴──────────────╯
╭──────────────────────────────────────────────────────────────────────╮
│ 9 special devices                                                    │
├──────────────┬───────┬────────┬───────┬────────┬────────┬────────────┤
│ MOUNTED ON   │  SIZE │   USED │ AVAIL │  USE%  │ TYPE   │ FILESYSTEM │
├──────────────┼───────┼────────┼───────┼────────┼────────┼────────────┤
│ /dev         │ 11.6G │     0B │ 11.6G │        │ devtmp │ udev       │
│              │       │        │       │        │ fs     │            │
│ /dev/shm     │ 11.7G │   1.0G │ 10.7G │   8.8% │ tmpfs  │ tmpfs      │
│ /run         │  2.3G │   4.2M │  2.3G │   0.2% │ tmpfs  │ tmpfs      │
│ /run/lock    │  5.0M │   4.0K │  5.0M │   0.1% │ tmpfs  │ tmpfs      │
│ /run/snapd/n │  2.3G │   4.2M │  2.3G │   0.2% │ tmpfs  │ tmpfs      │
│ s            │       │        │       │        │        │            │
│ /run/user/10 │  2.3G │ 340.0K │  2.3G │   0.0% │ tmpfs  │ tmpfs      │
│ 00           │       │        │       │        │        │            │
│ /sys/fs/cgro │  4.0M │     0B │  4.0M │        │ tmpfs  │ tmpfs      │
│ up           │       │        │       │        │        │            │
│ /tmp         │  6.0G │ 229.5M │  5.8G │   3.7% │ tmpfs  │ tmpfs      │
│ /var/snap/lx │  1.0M │     0B │  1.0M │        │ tmpfs  │ tmpfs      │
│ d/common/ns  │       │        │       │        │        │            │
╰──────────────┴───────┴────────┴───────┴────────┴────────┴────────────╯
24 32 0:22 / /sys rw,nosuid,nodev,noexec,relatime shared:7 - sysfs sysfs rw
25 32 0:23 / /proc rw,nosuid,nodev,noexec,relatime shared:15 - proc proc rw
26 32 0:5 / /dev rw,nosuid,noexec,relatime shared:2 - devtmpfs udev rw,size=12209420k,nr_inodes=3052355,mode=755
27 26 0:24 / /dev/pts rw,nosuid,noexec,relatime shared:3 - devpts devpts rw,gid=5,mode=620,ptmxmode=000
28 32 0:25 / /run rw,nosuid,nodev,noexec,relatime shared:5 - tmpfs tmpfs rw,size=2451880k,mode=755
32 1 0:28 /@ / rw,relatime shared:1 - btrfs /dev/mapper/ubuntu--vg-root rw,compress=zstd:3,ssd,space_cache,subvolid=256,subvol=/@
31 24 0:7 / /sys/kernel/security rw,nosuid,nodev,noexec,relatime shared:8 - securityfs securityfs rw
33 26 0:31 / /dev/shm rw,nosuid,nodev shared:4 - tmpfs tmpfs rw
34 28 0:32 / /run/lock rw,nosuid,nodev,noexec,relatime shared:6 - tmpfs tmpfs rw,size=5120k
35 24 0:33 / /sys/fs/cgroup ro,nosuid,nodev,noexec shared:9 - tmpfs tmpfs ro,size=4096k,nr_inodes=1024,mode=755
36 35 0:34 / /sys/fs/cgroup/unified rw,nosuid,nodev,noexec,relatime shared:10 - cgroup2 cgroup2 rw
37 35 0:35 / /sys/fs/cgroup/systemd rw,nosuid,nodev,noexec,relatime shared:11 - cgroup cgroup rw,xattr,name=systemd
38 24 0:36 / /sys/fs/pstore rw,nosuid,nodev,noexec,relatime shared:12 - pstore pstore rw
39 24 0:37 / /sys/firmware/efi/efivars rw,nosuid,nodev,noexec,relatime shared:13 - efivarfs efivarfs rw
40 24 0:38 / /sys/fs/bpf rw,nosuid,nodev,noexec,relatime shared:14 - bpf none rw,mode=700
41 35 0:39 / /sys/fs/cgroup/cpuset rw,nosuid,nodev,noexec,relatime shared:16 - cgroup cgroup rw,cpuset,clone_children
42 35 0:40 / /sys/fs/cgroup/hugetlb rw,nosuid,nodev,noexec,relatime shared:17 - cgroup cgroup rw,hugetlb
43 35 0:41 / /sys/fs/cgroup/blkio rw,nosuid,nodev,noexec,relatime shared:18 - cgroup cgroup rw,blkio
44 35 0:42 / /sys/fs/cgroup/pids rw,nosuid,nodev,noexec,relatime shared:19 - cgroup cgroup rw,pids
45 35 0:43 / /sys/fs/cgroup/freezer rw,nosuid,nodev,noexec,relatime shared:20 - cgroup cgroup rw,freezer
46 35 0:44 / /sys/fs/cgroup/perf_event rw,nosuid,nodev,noexec,relatime shared:21 - cgroup cgroup rw,perf_event
47 35 0:45 / /sys/fs/cgroup/memory rw,nosuid,nodev,noexec,relatime shared:22 - cgroup cgroup rw,memory
48 35 0:46 / /sys/fs/cgroup/net_cls,net_prio rw,nosuid,nodev,noexec,relatime shared:23 - cgroup cgroup rw,net_cls,net_prio
49 35 0:47 / /sys/fs/cgroup/cpu,cpuacct rw,nosuid,nodev,noexec,relatime shared:24 - cgroup cgroup rw,cpu,cpuacct
50 35 0:48 / /sys/fs/cgroup/rdma rw,nosuid,nodev,noexec,relatime shared:25 - cgroup cgroup rw,rdma
51 35 0:49 / /sys/fs/cgroup/devices rw,nosuid,nodev,noexec,relatime shared:26 - cgroup cgroup rw,devices
52 25 0:50 / /proc/sys/fs/binfmt_misc rw,relatime shared:27 - autofs systemd-1 rw,fd=28,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=16345
53 26 0:51 / /dev/hugepages rw,relatime shared:28 - hugetlbfs hugetlbfs rw,pagesize=2M
54 26 0:20 / /dev/mqueue rw,nosuid,nodev,noexec,relatime shared:29 - mqueue mqueue rw
55 24 0:6 / /sys/kernel/debug rw,nosuid,nodev,noexec,relatime shared:30 - debugfs debugfs rw
56 24 0:11 / /sys/kernel/tracing rw,nosuid,nodev,noexec,relatime shared:31 - tracefs tracefs rw
122 24 0:21 / /sys/kernel/config rw,nosuid,nodev,noexec,relatime shared:65 - configfs configfs rw
125 24 0:52 / /sys/fs/fuse/connections rw,nosuid,nodev,noexec,relatime shared:67 - fusectl fusectl rw
128 32 0:53 / /media/jak/smartdrive rw,relatime shared:69 - autofs systemd-1 rw,fd=48,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=26705
131 32 7:0 / /snap/charm/557 ro,nodev,relatime shared:71 - squashfs /dev/loop0 ro
134 32 0:54 / /tmp rw,nosuid,nodev,relatime shared:73 - tmpfs tmpfs rw,size=6291456k
137 32 7:3 / /snap/matterhorn/83 ro,nodev,relatime shared:75 - squashfs /dev/loop3 ro
140 32 7:4 / /snap/code/50 ro,nodev,relatime shared:77 - squashfs /dev/loop4 ro
143 32 7:2 / /snap/code/49 ro,nodev,relatime shared:79 - squashfs /dev/loop2 ro
146 32 7:5 / /snap/core/10402 ro,nodev,relatime shared:81 - squashfs /dev/loop5 ro
149 32 7:6 / /snap/eventstat/166 ro,nodev,relatime shared:83 - squashfs /dev/loop6 ro
237 32 7:1 / /snap/charm/562 ro,nodev,relatime shared:85 - squashfs /dev/loop1 ro
241 32 7:7 / /snap/core/10444 ro,nodev,relatime shared:87 - squashfs /dev/loop7 ro
425 32 7:9 / /snap/hugo/9404 ro,nodev,relatime shared:89 - squashfs /dev/loop9 ro
152 32 7:10 / /snap/gnome-3-28-1804/128 ro,nodev,relatime shared:91 - squashfs /dev/loop10 ro
155 32 259:2 / /boot rw,relatime shared:93 - ext4 /dev/nvme0n1p2 rw
158 155 259:1 / /boot/efi rw,relatime shared:95 - vfat /dev/nvme0n1p1 rw,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
361 32 7:8 / /snap/core18/1885 ro,nodev,relatime shared:97 - squashfs /dev/loop8 ro
567 32 7:12 / /snap/gnome-3-34-1804/36 ro,nodev,relatime shared:99 - squashfs /dev/loop12 ro
161 32 7:11 / /snap/gnome-3-26-1604/98 ro,nodev,relatime shared:101 - squashfs /dev/loop11 ro
166 32 0:28 /@squid /var/cache/squid-deb-proxy rw,relatime shared:103 - btrfs /dev/mapper/ubuntu--vg-root rw,compress=zstd:3,ssd,space_cache,subvolid=274,subvol=/@squid
169 32 0:28 /@log /var/log rw,relatime shared:105 - btrfs /dev/mapper/ubuntu--vg-root rw,compress=zstd:3,ssd,space_cache,subvolid=344,subvol=/@log
165 32 0:28 /@apt /var/cache/apt/archives rw,relatime shared:107 - btrfs /dev/mapper/ubuntu--vg-root rw,compress=zstd:3,ssd,space_cache,subvolid=273,subvol=/@apt
163 32 7:14 / /snap/go/6727 ro,nodev,relatime shared:109 - squashfs /dev/loop14 ro
177 32 0:58 / /srv/lxd rw,relatime shared:111 - btrfs /dev/mapper/ubuntu--vg-lxd rw,compress=zstd:3,ssd,space_cache,user_subvol_rm_allowed,subvolid=5,subvol=/
176 32 7:13 / /snap/hledger/x2 ro,nodev,relatime shared:113 - squashfs /dev/loop13 ro
182 32 253:1 / /home rw,relatime shared:115 - xfs /dev/mapper/ubuntu--vg-home rw,attr2,inode64,logbufs=8,logbsize=32k,noquota
188 32 7:15 / /snap/gnome-3-34-1804/60 ro,nodev,relatime shared:119 - squashfs /dev/loop15 ro
191 32 7:16 / /snap/firefox/454 ro,nodev,relatime shared:121 - squashfs /dev/loop16 ro
194 32 7:17 / /snap/git-ubuntu/470 ro,nodev,relatime shared:123 - squashfs /dev/loop17 ro
197 32 7:18 / /snap/mojo/121 ro,nodev,relatime shared:125 - squashfs /dev/loop18 ro
200 32 7:19 / /snap/core20/634 ro,nodev,relatime shared:127 - squashfs /dev/loop19 ro
203 32 7:20 / /snap/gnome-3-26-1604/100 ro,nodev,relatime shared:129 - squashfs /dev/loop20 ro
209 32 7:23 / /snap/mojo/125 ro,nodev,relatime shared:133 - squashfs /dev/loop23 ro
212 32 7:22 / /snap/gtk-common-themes/1513 ro,nodev,relatime shared:135 - squashfs /dev/loop22 ro
215 32 7:25 / /snap/gnome-3-28-1804/145 ro,nodev,relatime shared:137 - squashfs /dev/loop25 ro
218 32 7:26 / /snap/syncthing/501 ro,nodev,relatime shared:139 - squashfs /dev/loop26 ro
221 32 7:24 / /snap/snap-store/498 ro,nodev,relatime shared:141 - squashfs /dev/loop24 ro
376 32 7:28 / /snap/zoom-client/118 ro,nodev,relatime shared:143 - squashfs /dev/loop28 ro
224 32 7:27 / /snap/juju/14498 ro,nodev,relatime shared:145 - squashfs /dev/loop27 ro
227 32 7:30 / /snap/git-ubuntu/474 ro,nodev,relatime shared:147 - squashfs /dev/loop30 ro
230 32 7:29 / /snap/go/6745 ro,nodev,relatime shared:149 - squashfs /dev/loop29 ro
233 32 7:32 / /snap/eventstat/160 ro,nodev,relatime shared:151 - squashfs /dev/loop32 ro
236 32 7:31 / /snap/juju/14356 ro,nodev,relatime shared:153 - squashfs /dev/loop31 ro
245 32 7:33 / /snap/lxd/18520 ro,nodev,relatime shared:155 - squashfs /dev/loop33 ro
248 32 7:34 / /snap/snapcraft/5756 ro,nodev,relatime shared:157 - squashfs /dev/loop34 ro
251 32 7:35 / /snap/gtk-common-themes/1514 ro,nodev,relatime shared:159 - squashfs /dev/loop35 ro
254 32 7:37 / /snap/riseup-vpn/161 ro,nodev,relatime shared:161 - squashfs /dev/loop37 ro
257 32 7:36 / /snap/hugo/9478 ro,nodev,relatime shared:163 - squashfs /dev/loop36 ro
260 32 7:38 / /snap/core18/1932 ro,nodev,relatime shared:165 - squashfs /dev/loop38 ro
263 32 7:39 / /snap/snap-store/467 ro,nodev,relatime shared:167 - squashfs /dev/loop39 ro
266 32 7:41 / /snap/firefox/457 ro,nodev,relatime shared:169 - squashfs /dev/loop41 ro
269 32 7:40 / /snap/zoom-client/113 ro,nodev,relatime shared:171 - squashfs /dev/loop40 ro
272 32 7:42 / /snap/spotify/42 ro,nodev,relatime shared:173 - squashfs /dev/loop42 ro
275 32 7:43 / /snap/matterhorn/79 ro,nodev,relatime shared:175 - squashfs /dev/loop43 ro
278 32 7:44 / /snap/syncthing/498 ro,nodev,relatime shared:177 - squashfs /dev/loop44 ro
281 32 7:45 / /snap/spotify/43 ro,nodev,relatime shared:179 - squashfs /dev/loop45 ro
284 32 7:46 / /snap/riseup-vpn/159 ro,nodev,relatime shared:181 - squashfs /dev/loop46 ro
287 32 7:47 / /snap/hledger-jak/2 ro,nodev,relatime shared:183 - squashfs /dev/loop47 ro
293 32 7:49 / /snap/hledger/x1 ro,nodev,relatime shared:187 - squashfs /dev/loop49 ro
296 32 7:50 / /snap/snapcraft/5793 ro,nodev,relatime shared:189 - squashfs /dev/loop50 ro
302 52 0:60 / /proc/sys/fs/binfmt_misc rw,nosuid,nodev,noexec,relatime shared:193 - binfmt_misc binfmt_misc rw
1921 28 0:25 /snapd/ns /run/snapd/ns rw,nosuid,nodev,noexec,relatime - tmpfs tmpfs rw,size=2451880k,mode=755
1970 1921 0:4 mnt:[4026532474] /run/snapd/ns/lxd.mnt rw - nsfs nsfs rw
2792 1921 0:4 mnt:[4026532476] /run/snapd/ns/multipass.mnt rw - nsfs nsfs rw
3386 32 0:69 / /var/snap/lxd/common/ns rw,relatime - tmpfs tmpfs rw,size=1024k,mode=700
3419 3386 0:4 mnt:[4026532611] /var/snap/lxd/common/ns/shmounts rw - nsfs nsfs rw
3354 3386 0:4 mnt:[4026532474] /var/snap/lxd/common/ns/mntns rw - nsfs nsfs rw
4063 28 0:80 / /run/user/1000 rw,nosuid,nodev,relatime shared:1855 - tmpfs tmpfs rw,size=2451876k,nr_inodes=612969,mode=700,uid=1000,gid=1000
4101 4063 0:81 / /run/user/1000/gvfs rw,nosuid,nodev,relatime shared:1873 - fuse.gvfsd-fuse gvfsd-fuse rw,user_id=1000,group_id=1000
4139 4063 0:82 / /run/user/1000/doc rw,nosuid,nodev,relatime shared:1891 - fuse.portal portal rw,user_id=1000,group_id=1000
4193 1921 0:4 mnt:[4026532763] /run/snapd/ns/syncthing.mnt rw - nsfs nsfs rw
5734 1921 0:4 mnt:[4026533190] /run/snapd/ns/spotify.mnt rw - nsfs nsfs rw
3978 32 0:28 / /mnt rw,relatime shared:1599 - btrfs /dev/mapper/ubuntu--vg-root rw,compress=zstd:3,ssd,space_cache,subvolid=5,subvol=/
3977 55 0:11 / /sys/kernel/debug/tracing rw,nosuid,nodev,noexec,relatime shared:1839 - tracefs tracefs rw
1452 32 7:52 / /snap/core20/875 ro,nodev,relatime shared:2268 - squashfs /dev/loop52 ro
7334 32 7:53 / /snap/lxd/18546 ro,nodev,relatime shared:2558 - squashfs /dev/loop53 ro
206 32 7:21 / /snap/multipass/3003 ro,nodev,relatime shared:131 - squashfs /dev/loop21 ro
7757 1921 0:4 mnt:[4026533092] /run/snapd/ns/zoom-client.mnt rw - nsfs nsfs rw
7511 32 7:48 / /snap/multipass/3020 ro,nodev,relatime shared:2108 - squashfs /dev/loop48 ro

How install?

There is one whong missing in the README... how to install this?
I know about Go, but not how to install or anything. So please advice!

[Feature request] Reverse of `hide` comand line args

Very often I'd like to see stats about some specific type of mounts. For example having only hide options I have to go with putting these all into a command line to show only local mounts: -hide-binds -hide-fuse -hide-loops -hide-network -hide-special

Would be very handy to have a reverse of all of the hide args, e.g. -only-local to show only local mounts and nothing else.

Thanks in advance.

Color doesn't work in kitty.

Unless TERM is set to set xterm-256color, duf outputs black and white information.

/usr/lib/terminfo/k/kitty is present (the whole directory is symlinked from /usr/share/terminfo in archlinux).

It works fine in st.

Seems related to #5.

Add an option to force color output

When I pipe duf into less I want to preserve colors. Currently there is no option for that. Could an option like --color or --color=always be added?

Bind mounts should be in the list of special devices

I have some entries in my /etc/fstab which are bind mounts:

/mnt/hdd/sources /src none defaults,bind 0 0

duf shows them in the list of normal, non-special devices, but I think they should be either hidden or shown in the special devices section. There doesn't seem to be a good way to detect a bind mount other than parsing /etc/fstab.

Different percentage as df

So df says this:
/dev/mapper/ubuntu--vg-root 232G 210G 9.8G 96% /

And duf says this:
│ / │ 231.5G │ 209.9G │ 9.8G │ [##################..] 90.7% │ ext4 │ /dev/ubuntu--vg/root │

Why is this 90.7 vs 96 percentage difference?

This is on Ubuntu 20.04.1 with duf 3.1 and df 8.3.0

TUI Broken Table

image

  • Display OS: Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64 x86_64
  • Terminal: iTerm2 Build 3.3.12
  • Terminal Profile:

image

OpenBSD Partitions (probably the same with other *BSD)

Hello,

I just made a port of duf for OpenBSD (pretty nice!), I realised that with only one disk (or drive) with for example 4 partitions (sd0a, sd0b, sd0d, sd0e) duf detects this as 4 drives, but actually is only one with 4 partitions.

"permission denied" errors in output

Just installed duf-r17.3818846-1 from AUR and ran it as regular user:

screenshot of duf output

Running with sudo, the "permission denied" errors are gone, but it should work with regular users as well.

openSUSE: permission denied on /sys/kernel/debug/tracing

Operating system: openSUSE Tumbleweed, built from source using official go version 1.14.9.

When running duf as user, I get permission denied:

$ ./duf
/sys/kernel/debug/tracing: permission denied
[tables ommitted]

Running through sudo works, since only root has access to /sys/kernel/debug:

$ ls -ld /sys/kernel/debug 
drwx------ 48 root root 0 10. Okt 2020  /sys/kernel/debug

Relevant part of /proc/self/mountinfo:

49 23 0:6 / /sys/kernel/debug rw,nosuid,nodev,noexec,relatime shared:28 - debugfs debugfs rw
675 49 0:11 / /sys/kernel/debug/tracing rw,nosuid,nodev,noexec,relatime shared:380 - tracefs tracefs rw

Feature request: "-hide-overlay" option

First, thanks for this greate enhancements to df!

On hosts with many docker containers, overlay filesystems are listed under the "local" section and shows duplicate space information of their mother filesystem.
How about adding -hide-overlay option and set it true by default?
Or maybe we could split overlay filesystems under a separate section.

ImDisk RAM disk not shown on Windows even with -all

As in the title: the OS SSD, internal HDD and external USB 3.0 HDD are all shown correctly, but this ram disk (formatted to NTFS of course) is not, not even with -all.

This RAM disk is shown by the df command (I tried the one that came with git bash, the one that is in msys directory of Haskell Platform and the one in a Windows build of busybox, all three show it).

Displaying inodes metrics

Instead of displaying used, free and total volume size do the same for the inodes on a storage volume (if available).

I have no recommendation on how this is activated, using either a flag/param or using the atop approach.

Show lvm

Hello,

Is it possible to display the devices to which LVM logical volumes are associated? Look like command lsblk.

Add an option to hide specific file types

I have a lot of shm filesystems (~100) which I normally don't care about and I would like to hide. I could use --hide-special but then I would also hide other tmpfs which I would like to be displayed. I think an option like --hide-fs=shm would be a nice addition.

Snap Roadmap

Because making a snap seems not as easy (#25), I wanted to use this issue as a bit of a roadmap to track problems, To Dos and other useful information. Feel free to either edit this directly or suggest things via commenting.


To Do

  • Fix the cluttered output described in #25 when using the snap
  • Maybe create an extra snap branch for easier collaboration and to keep snap development away from the rest of the project
  • Write tests to check whether the snap builds correctly (I've started this here). Unfortunately (afaik), you can only have one snapcraft.yaml per project. Therefore, we can't have one yaml producing the "production" releases on every pushed tag and another one checking every commit/PR for errors.
  • Create a snapcraft developer account and upload the snap. They have some sort of GitHub integration built into their infrastructure as well, might be worth a look.

Done

  • Produce a snap with a valid snapcraft.yaml
  • Make the snap's version number change automatically with every new release

Feature request: Same widths for table output

From a visual standpoint, it would be nice if all tables had the same width.
Maybe it is possible to define a width relative to the terminal size or roughly estimate it based on longest mount/filesystem entry length.

Does not compile on Ubuntu 18.04

I tried to compile the project, commit d101a0f, i.e. the last at the time of writing, on Ubuntu 18.04, but I have the following error:

table.go:8:2: cannot find package "github.com/jedib0t/go-pretty/v6/table" in any of:
	/usr/lib/go-1.10/src/github.com/jedib0t/go-pretty/v6/table (from $GOROOT)
	/home/clement/go/src/github.com/jedib0t/go-pretty/v6/table (from $GOPATH)
table.go:9:2: cannot find package "github.com/jedib0t/go-pretty/v6/text" in any of:
	/usr/lib/go-1.10/src/github.com/jedib0t/go-pretty/v6/text (from $GOROOT)
	/home/clement/go/src/github.com/jedib0t/go-pretty/v6/text (from $GOPATH)
main.go:9:2: cannot find package "github.com/muesli/termenv" in any of:
	/usr/lib/go-1.10/src/github.com/muesli/termenv (from $GOROOT)
	/home/clement/go/src/github.com/muesli/termenv (from $GOPATH)
main.go:10:2: cannot find package "golang.org/x/crypto/ssh/terminal" in any of:
	/usr/lib/go-1.10/src/golang.org/x/crypto/ssh/terminal (from $GOROOT)
	/home/clement/go/src/golang.org/x/crypto/ssh/terminal (from $GOPATH)
mounts.go:8:2: cannot find package "golang.org/x/sys/unix" in any of:
	/usr/lib/go-1.10/src/golang.org/x/sys/unix (from $GOROOT)
	/home/clement/go/src/golang.org/x/sys/unix (from $GOPATH)

Notice that there is no issue on Ubuntu 20.04.

"operation not permitted"

When running duf 0.5.2-4 from AUR, I always receive this message:

/run/user/1000/doc: operation not permitted

After that, all works well. What does that mean?

FreeBSD Issues

Hi.

Thanks for supporting FreeBSD :)

Many great tools are Linux only these days.

There are two issues I have on FreeBSD (12.2-BETA3) system:

  1. NFS not listed as 'remote device' type.
  2. The /compat/linux/dev/shm is reported twice.
  3. I would also put fdescfs/linprocfs/linsysfs/procfs in 'special devices' category.

Here is the duf(1) output:

% duf
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ 18 local devices                                                                                                     │
├───────────────────────┬────────┬────────┬────────┬───────────────────────────────┬───────────┬───────────────────────┤
│ MOUNTED ON            │   SIZE │   USED │  AVAIL │              USE%             │ TYPE      │ FILESYSTEM            │
├───────────────────────┼────────┼────────┼────────┼───────────────────────────────┼───────────┼───────────────────────┤
│ /                     │  96.3G │   6.6G │  89.6G │ [#...................]   6.9% │ zfs       │ zroot/ROOT/12.2-BETA3 │
│ /compat/linux/dev/fd  │   1.0K │   1.0K │     0B │ [####################] 100.0% │ fdescfs   │ fdescfs               │
│ /compat/linux/dev/shm │   7.6G │   4.0K │   7.6G │ [....................]   0.0% │ tmpfs     │ tmpfs                 │
│ /compat/linux/dev/shm │   7.6G │   4.0K │   7.6G │ [....................]   0.0% │ tmpfs     │ tmpfs                 │
│ /compat/linux/proc    │   4.0K │   4.0K │     0B │ [####################] 100.0% │ linprocfs │ linprocfs             │
│ /compat/linux/sys     │   4.0K │   4.0K │     0B │ [####################] 100.0% │ linsysfs  │ linsysfs              │
│ /home                 │ 102.0G │  12.4G │  89.6G │ [##..................]  12.1% │ zfs       │ zroot/home            │
│ /media/remote         │   4.4T │   3.4T │   1.0T │ [###############.....]  77.1% │ nfs       │ 192.168.0.12:/data    │
│ /proc                 │   4.0K │   4.0K │     0B │ [####################] 100.0% │ procfs    │ procfs                │
│ /tmp                  │  89.6G │   1.2M │  89.6G │ [....................]   0.0% │ zfs       │ zroot/tmp             │
│ /usr/ports            │  90.4G │ 750.4M │  89.6G │ [....................]   0.8% │ zfs       │ zroot/usr/ports       │
│ /usr/src              │  90.3G │ 732.2M │  89.6G │ [....................]   0.8% │ zfs       │ zroot/usr/src         │
│ /var/audit            │  89.6G │  88.0K │  89.6G │ [....................]   0.0% │ zfs       │ zroot/var/audit       │
│ /var/crash            │  89.6G │  88.0K │  89.6G │ [....................]   0.0% │ zfs       │ zroot/var/crash       │
│ /var/log              │  89.6G │   1.7M │  89.6G │ [....................]   0.0% │ zfs       │ zroot/var/log         │
│ /var/mail             │  89.6G │  96.0K │  89.6G │ [....................]   0.0% │ zfs       │ zroot/var/mail        │
│ /var/tmp              │  89.6G │ 212.0K │  89.6G │ [....................]   0.0% │ zfs       │ zroot/var/tmp         │
╰───────────────────────┴────────┴────────┴────────┴───────────────────────────────┴───────────┴───────────────────────╯
╭──────────────────────────────────────────────────────────────────────────────────────────────╮
│ 2 special devices                                                                            │
├───────────────────┬──────┬──────┬───────┬───────────────────────────────┬───────┬────────────┤
│ MOUNTED ON        │ SIZE │ USED │ AVAIL │              USE%             │ TYPE  │ FILESYSTEM │
├───────────────────┼──────┼──────┼───────┼───────────────────────────────┼───────┼────────────┤
│ /compat/linux/dev │ 1.0K │ 1.0K │    0B │ [####################] 100.0% │ devfs │ devfs      │
│ /dev              │ 1.0K │ 1.0K │    0B │ [####################] 100.0% │ devfs │ devfs      │
╰───────────────────┴──────┴──────┴───────┴───────────────────────────────┴───────┴────────────╯

Here is the output of mount(8) command on my system.

% mount | sort
192.168.0.12:/data on /media/remote (nfs, noatime)
devfs on /compat/linux/dev (devfs, local, multilabel)
devfs on /dev (devfs, local, multilabel)
fdescfs on /compat/linux/dev/fd (fdescfs)
linprocfs on /compat/linux/proc (linprocfs, local)
linsysfs on /compat/linux/sys (linsysfs, local)
tmpfs on /compat/linux/dev/shm (tmpfs, local)
tmpfs on /compat/linux/dev/shm (tmpfs, local)
zroot/home on /home (zfs, local, noatime, nfsv4acls)
zroot/ROOT/12.2-BETA3 on / (zfs, local, noatime, nfsv4acls)
zroot/tmp on /tmp (zfs, local, noatime, nosuid, nfsv4acls)
zroot/usr/ports on /usr/ports (zfs, local, noatime, nosuid, nfsv4acls)
zroot/usr/src on /usr/src (zfs, local, noatime, nfsv4acls)
zroot/var/audit on /var/audit (zfs, local, noatime, noexec, nosuid, nfsv4acls)
zroot/var/crash on /var/crash (zfs, local, noatime, noexec, nosuid, nfsv4acls)
zroot/var/log on /var/log (zfs, local, noatime, noexec, nosuid, nfsv4acls)
zroot/var/mail on /var/mail (zfs, local, nfsv4acls)
zroot/var/tmp on /var/tmp (zfs, local, noatime, nosuid, nfsv4acls)

Hope that helps.

Regards.

Colour is turned off on screen-256color

Colour output works automatically on xterm-256color, but not screen-256color .

Bildschirmfoto vom 2020-09-21 08-46-15
Bildschirmfoto vom 2020-09-21 08-46-34

/lib/terminfo/s/screen-256color is present as normal, infocmp works for it.

thanks for the software 🙏

Exclude option

Hello,

First of all I would like to say what a great job you have done this is truly awesome, also this is not an issue, not important but would be really good to be able to exclude a type of file-system, in my case I would like to exclude the snap squashfs as there are so many that skews / distract from what I want to see.

If possible that would be great 👍

add parsable output

it would be cool if it could output something like json for instance, so that you can easily use it in script or from other programs

Escaped character in type & filesystem field

When type or filesystem filed in /proc/self/mountinfo contains escaped character, it will be displayed in escaped form.

For example, when I make a mount point with a \ character at the end of its type or filesystem.
What I supposed to see:

│ MOUNTED ON                        │ SIZE │ USED │ AVAIL │ USE% │ TYPE                   │ FILESYSTEM        │
├───────────────────────────────────┼──────┼──────┼───────┼──────┼────────────────────────┼───────────────────┤
│ /tmp/mnt                          │   0B │   0B │    0B │      │ fuse.hello\            │ hello\            │

What I actually see:

│ MOUNTED ON                        │ SIZE │ USED │ AVAIL │ USE% │ TYPE                   │ FILESYSTEM        │
├───────────────────────────────────┼──────┼──────┼───────┼──────┼────────────────────────┼───────────────────┤
│ /tmp/mnt                          │   0B │   0B │    0B │      │ fuse.hello\134         │ hello\134         │

What df says:

Filesystem                              Type                   1K-blocks     Used Available Use% Mounted on
hello\                                  fuse.hello\                    0        0         0    - /tmp/mnt

What /proc/self/mountinfo says:

862 54 0:68 / /tmp/mnt rw,nosuid,nodev,relatime shared:470 - fuse.hello\134 hello\134 rw,user_id=1000,group_id=1000

\134 clearly is the escaped format of \.

This issue is also reported on WSL by @SuperSandro2000 #56 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.