12

I'd like to display the recursive size (the value that would be reported by du) of folder contents in-line in the dired buffer as an additional column or in place of the directory file size. Is this already possible with dired/dired+ or a related package?

I've done some digging and found some discussion of this sort of functionality, but nothing that integrates that size information back into the graphical interface of dired.

  • 1
    Just an FYI - this is under developmend and will be released either in ELPA as a new package (dired-du) or as part of dired itself. – Alex May 31 '17 at 7:01
  • I saw this package land in ELPA just yesterday. – Mattias Bengtsson Jun 1 '17 at 12:31
3

Indeed, Alex is right.

If your Emacs version is >=24.4, then you can try `dired-du' library. It's available from the ELPA repository.

Once you've installed this lib: If your current buffer is in Dired mode, then you can do:

C-x M-r

that toggles the `dired-du-mode' and displays the recursive size of the directories 'in place' in the Dired buffer. If you visit a new Dired buffer, then it will show recursive buffers as well, until you toggle off the mode.

Another tip:

C-x C-h

This toggles the size format. There are 3 formats:

  1. Default one from `ls' command.

  2. Human readable format.

  3. Numeric format with thousands comma separator.

You can customize the option `dired-du-size-format' to make your size formar choice persistent.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.