10

MC shows file sizes in kilobytes and bytes by default, but it is hard to read, and it would be easier to see them in the "closest" unit available. That is:

1234567  -> 1M  
123456   -> 123K
12345678 -> 12M
toraritte
  • 1,128

1 Answers1

11

Option 1: Using the interface

Change it in one of the panels by

  1. Pressing F9
  2. Choose Left (or Right)
  3. Select Listing format...
  4. Check User defined: and set the size string to size:4 and select OK. It should look like this:
      ┌────────────── Listing format ──────────────┐
      │ ( ) Full file list                         │
      │ ( ) Brief file list: 2        [^] columns  │
      │ ( ) Long file list                         │
      │ (*) User defined:                          │
      │ half type name | size:4 | perm         [^] │
      ├────────────────────────────────────────────┤
      │ [ ] User mini status                       │
      │ half type name | size | perm           [^] │
      ├────────────────────────────────────────────┤
      │            [< OK >] [ Cancel ]             │
      └────────────────────────────────────────────┘
    
  5. To make it permanent, F9 > Options > Save setup.

Option 2: Editing the configuration file

Edit the file ~/.config/mc/panels.ini. There should be two user_format= entries, one under [New Left Panel] and other under [New Right Panel]. Change the entry of the desired panel to

user_format=half type name | size:4 | perm

The documentation

The relevant quote of the documentation, under Listing Format...:

To force one field to a fixed size (a size specifier), you just add : followed by the number of characters you want the field to have. If the number is followed by the symbol +, then the size specifies the minimal field size - if the program finds out that there is more space on the screen, it will then expand that field.

Therefore, bsize:4 is also possible. It is equal to size:4, except that for directories it just shows SUB-DIR or UP--DIR.

toraritte
  • 1,128