Is it possible to customize the file browser to show the sizes of directories and/or files?
Perhaps something like the command: du --apparent-size -hs .[^.]* *
Thanks.
Is it possible to customize the file browser to show the sizes of directories and/or files?
Perhaps something like the command: du --apparent-size -hs .[^.]* *
Thanks.
It is possible, but it is not configurable. You could change the code for the Files app and all the associated pieces to get that info and render it, but any update would overwrite those changes so you’d have to use a technique to handle that such as symlinks possibly or using git.
But, does the files app not show you the size of files currently? Here’s my view, which will list file sizes:
Hi Travis,
Thank you for responding.
Yes, the files app does show the sizes of the files, but not the directories.
There doesn’t seem to be an easy solution other than to switch to command line and run a du command.
Much appreciated.
Jeff
I was wondering if you were specifically referring to the directories not displaying the file size.
Looking at this I’m not totally sure why that data is not presented so I’ve opened an issue to capture this work:
Thanks for the post!
After looking into this more, there’s a good reason the file browser does not allow this behavior. I’ve closed the issue and below is the copy of why:
After looking into this more this is not simple or a good idea. The issue is that on an HPC system with a posix file system one will not know the depth or content of any given directory. Issuing du to look at these sizes runs the risk of consuming compute resources because the size of any directory could be massive. AWS S3 and Google are not using posix file systems to store data on their systems, which is why they can give these numbers to users but something like our file browser cannot.
Thank you Travis.
Makes sense.
Much appreciated.
Best,
Jeff
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.