9

Windows 10 (64 bit), Emacs 25.1, package dired+.

In dired mode files size show in bytes. But I want to show in KB.

enter image description here

Alex
  • 801
  • 2
  • 8
  • 18

2 Answers2

11

Try using h among your dired-listing-switches - e.g., -alFh. It stands for "human-readable", and it shows sizes in KB etc.

But which ls switches are available can depend on your particular ls command (e.g. on your platform), so try M-x man RET ls RET.

Instead of, or in addition to, setting dired-listing-switches, you can just use a prefix arg with command dired, to be prompted for the ls switches to use for that directory listing. E.g., C-u C-x d.


Update 2019-06-16. If your ls supports it (or if you use built-in ls-lisp.el, which is the case by default for MS Windows) you can use S (uppercase) with h to show and sort by human-readable size.

Drew
  • 77,472
  • 10
  • 114
  • 243
5

Does dired-listing-switches help? I've set mine to -alh and I get the filesizes in KB, but not the available bytes. There might be another setting for that.

Dave F
  • 573
  • 2
  • 14
  • Yes, it's help. https://emacs.stackexchange.com/questions/64156/why-in-dired-mode-dired-k-human-readable-t-not-work/64160#64160 – a_subscriber Mar 27 '21 at 18:05