Re: du output?



Hello!

Is there a way to use du -s output for directories' size column instead
of the default display (4096 for most dirs, on my system) that makes
little sense to me? Or a switch between the default display and du
display?

No.  You have a choice between size for files and directories ("size" in
the "Listing mode" dialog) and size for files only ("bsize" in the same
dialog).  If you look into src/screen.c, there is a structure "formats"  
that gives you all supported elements.  Neither of them uses external
commands.

If it's not implemented, how difficult it might be to add an external
call for du (e.g. upon some keystroke) and replace the size values for
selected dirs with the du output? Is there a similar functionality in mc
from which I could borrow code?

External panelize (src/panelize.c) calls a user-specified command and 
opens a pipe to read its output.

But I don't think this code will ever be applied to the mc sources.  This
option would make mc too slow, and most people won't use it.  When a
feature is rarely used, the code can be easily broken by further changes
without anybody noticing it for a long time.  There is not enough manpower
to maintain bloated code.

-- 
Regards,
Pavel Roskin




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]