You are not logged in.
Thanks for the detailed reply. Sorry, I don't like the feeling of running in, pointing my finger and yelling "bloat!". It's pretty accusatory and I'm not that dogmatic about it. I agree that adding the extra options won't slow down its core operation. I was mainly thinking about maintainability of an extra 1300 lines of code. Anyway, I'm not really complaining since I use dfc every day!
Offline
You're welcome! And don't be sorry. I actually like when users share their point of view! If I had thought you were right, I would have re-think dfc.
About your concern about maintainability:
Before implementing all those new options, I took quite some time to think about dfc's code structure. I rearranged the code from a monolithic structure to something adapted to the growth of code.
For the new export format (which is the main cause of the growth in terms of lines of code), I use a design pattern very similar to the factory method pattern which makes the code very easy to adapt and with only minor changes when required. All that only to say I pay a special attention to the code structure and readability so it is really easy for me to maintain dfc over time (the code is also much commented).
So you should not be worry about it.
I'm not really complaining since I use dfc every day!
Woaoo...! I do not even use dfc every day myself! I'm glad you it's helpful for you.
Offline
Hi,
in the development version, I've added a new filter which works like this:
[robin@thor ~] % dfc -p /dev
FILESYSTEM (=) USED FREE (-) %USED AVAILABLE TOTAL MOUNTED ON
/dev [--------------------] 0% 3.8G 3.8G /dev
/dev/sdc1 [===========---------] 54% 12.8G 27.9G /
/dev/sda7 [====----------------] 16% 80.5M 95.4M /boot
/dev/sda3 [==============------] 69% 105.7G 344.6G /home
/dev/sda5 [============--------] 59% 5.2G 12.6G /var
/dev/sdb1 [===============-----] 73% 81.3G 297.8G /mnt/Videos
[robin@thor ~] % dfc -p /dev/sda
FILESYSTEM (=) USED FREE (-) %USED AVAILABLE TOTAL MOUNTED ON
/dev/sda7 [====----------------] 16% 80.5M 95.4M /boot
/dev/sda3 [==============------] 69% 105.7G 344.6G /home
/dev/sda5 [============--------] 59% 5.2G 12.6G /var
[robin@thor ~] % dfc -p /dev/sda,/dev/sdb
FILESYSTEM (=) USED FREE (-) %USED AVAILABLE TOTAL MOUNTED ON
/dev/sda7 [====----------------] 16% 80.5M 95.4M /boot
/dev/sda3 [==============------] 69% 105.7G 344.6G /home
/dev/sda5 [============--------] 59% 5.2G 12.6G /var
/dev/sdb1 [===============-----] 73% 81.3G 297.8G /mnt/Videos
[robin@thor ~] % dfc -p -/dev/sda,/dev/sdb
FILESYSTEM (=) USED FREE (-) %USED AVAILABLE TOTAL MOUNTED ON
rootfs [===========---------] 54% 12.8G 27.9G /
/dev [--------------------] 0% 3.8G 3.8G /dev
run [=-------------------] 0% 3.8G 3.8G /run
/dev/sdc1 [===========---------] 54% 12.8G 27.9G /
shm [=-------------------] 3% 3.7G 3.8G /dev/shm
tmpfs [=-------------------] 0% 6.0G 6.0G /tmp
[robin@thor ~] % dfc -p /
FILESYSTEM (=) USED FREE (-) %USED AVAILABLE TOTAL MOUNTED ON
/dev [--------------------] 0% 3.8G 3.8G /dev
/dev/sdc1 [===========---------] 54% 12.8G 27.9G /
/dev/sda7 [====----------------] 16% 80.5M 95.4M /boot
/dev/sda3 [==============------] 69% 105.7G 344.6G /home
/dev/sda5 [============--------] 59% 5.2G 12.6G /var
/dev/sdb1 [===============-----] 73% 81.3G 297.8G /mnt/Videos
[robin@thor ~] % dfc -p /dev/sdc1
FILESYSTEM (=) USED FREE (-) %USED AVAILABLE TOTAL MOUNTED ON
/dev/sdc1 [===========---------] 54% 12.8G 27.9G /
It works a little bit differently but I think you get about the same result.
Offline
Can dfc also show a "used" column in space (gb, mb, etc..) along with the bar graph? I looked through the options and could not figure it out. Thanks.
Offline
Sure. How is it even possible I did not pay attention to this? It'll be added for version 3.0.0 then.
Offline
Sure. How is it even possible I did not pay attention to this? It'll be added for version 3.0.0 then.
Thank you.
Offline
I might be useful to show the used space in absolute size and not just as a percentage of the available space.
That is what I meant by my previous comment:
Can dfc also show a "used" column in space (gb, mb, etc..) along with the bar graph? I looked through the options and could not figure it out. Thanks.
and it is getting added in version 3.0.0
Sure. How is it even possible I did not pay attention to this? It'll be added for version 3.0.0 then.
Offline
First of all, thank you for dfc -- it's a really nice utility. I have a little problem with the difference in computed sizes when I run dfc (v. 2.5 and 3.0.0-devel) and df side by side:
~ $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 14G 3.6G 9.2G 29% /
/dev/sda1 9.7G 3.6G 5.6G 39% /mnt/sda1
/dev/sda3 396G 289G 87G 77% /mnt/sda3
tmpfs 1.5G 73M 1.5G 5% /tmp
vs
~ $ dfc
FILESYSTEM (=) USED FREE (-) %USED AVAILABLE TOTAL MOUNTED ON
/dev/sda5 [=======-------------] 32% 9.1G 13.4G /
/dev/sda1 [=========-----------] 42% 5.6G 9.6G /mnt/sda1
/dev/sda3 [================----] 78% 86.7G 395.0G /mnt/sda3
tmpfs [=-------------------] 5% 1.4G 1.5G /tmp
Where does the difference in reported disk usage come from? What am I missing?
:: Registered Linux User No. 223384
:: github
:: infinality-bundle+fonts: good looking fonts made easy
Offline
Actually, computing sizes is really more complicated than it seems. There is lots of things to consider and it gets even worse when considering other OS (read *BSD type). They all have their specific stuff.
If you read stavfs(3) man page, you will notice that the statvfs structure contains various information and that, for instance, the free blocks number differs for a privileged and an unprivileged user. In df(1) they compute the used size by subtracting what is available to the root user from the total size. In dfc, I compute the used size using f_bavail instead because it seems more logical to me. This is different so this is why I mention this in dfc(1) man page.
To be honest, I planned to review how I size is computed in dfc(1) for all platforms on which dfc(1) currently runs or is planned to be ported on.
However, I do not think dfc(1) provides wrong values, it just depends on the point of view. I compared dfc(1) with other similar tools (pydf, cdf, xdf, discus and di) and they all display different values...
@dodo3773 & bloom: I just implemented this as an option (-d) in the development branch.
Offline
Thank you so much for your comprehensive explanation (and some reading recommendation). I suspected my 'frame of reference' was to blame which made me search for fixed, file system relative values. Now the thing seems clearer, though even more complicated. ;-)
:: Registered Linux User No. 223384
:: github
:: infinality-bundle+fonts: good looking fonts made easy
Offline
Hi all,
dfc 3.0.0 is near (should be released in about 2 weeks from now) and... among lots of other things, it brings translation support.
If you feel like wanting to help or want dfc into a language you speak fluently, your contribution would be much appreciated.
I wrote a news that explains the process to follow.
Cheers
Offline
Hi,
dfc 3.0.0 is out
Read the announcement for details (and there are a lot of changes!).
I hope you will enjoy it.
Offline
Awesome. Thanks for the "show used size" switch. Exactly what I wanted.
Offline
Very nice suggestion.
I'll add it on the roadmap for version 3.1.0
Offline
Hi all,
I just released version 3.0.1 which fixes really minor bugs and adds a changelog file as I have been requested.
I'll probably start working on version 3.1.0 now. If you have some feature requests, don't hesitate. ;-)
By the way, I set up a Github mirror so if you would like to contribute (either by providing new translations or patches) you can also do it using this social coding platform.
Cheers
Offline
I see no reason for not implementing this minor feature. Therefore, I opened a task for it.
However, I'll be too busy until the end of this year to be able to work on dfc. So don't expect it before early next year.
Offline
Hi, Rolinh , can you add an option to print the label of the partition?
Using Openbox + Tint2 + Idesk
Offline
Hi, Rolinh , can you add an option to print the label of the partition?
Hi,
This was already planned actually. See this ticket.
However, same remark as in my last message: I won't have time to work on dfc before the very end of this year so be patient.
Last edited by Rolinh (2012-11-09 18:14:53)
Offline
Hi guys,
I just released dfc 3.0.2 which brings 2 bug fixes (a minor and an annoying one). See this annoucement for information.
Therefore, I updated the AUR package to 3.0.2.
Version 3.1.0 is still on the way but unfortunately I haven't much time to spend on it at the moment.
Cheers
Offline
Hi guys,
I just released version 3.0.3 which mostly packs minor bug and security fixes. See the announcement for details.
Of course, the AUR package has been updated.
Cheers
Offline