You are not logged in.

#1 2017-02-01 20:55:27

doxa
Member
Registered: 2016-10-24
Posts: 32

All Folders Display Same Size

Greetings,

Not a major issue, but all of my folders display the same size in the File Manager (4.1 kb) regardless of the content. Any idea how I can correct this?


Thanks in advance,
doxa

Offline

#2 2017-02-01 21:21:01

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2015-09-29
Posts: 767

Re: All Folders Display Same Size

^This is fairly normal. If you go to terminal and execute:

$ ls -Al

you would normally see '4096 bytes' for all your dirs.

The exceptions are directories with lots of (sub)entries

$ ls -Al /usr
total 176
drwxr-xr-x   2 root root  86016 Feb  1 10:13 bin/
drwxr-xr-x   2 root root   4096 Nov  8 11:09 games/
drwxr-xr-x  51 root root  20480 Jan 30 10:05 include/
drwxr-xr-x 144 root root  28672 Feb  1 21:07 lib/
drwxrwsr-x  11 root staff  4096 Sep 21  2014 local/
drwxr-xr-x   2 root root  12288 Feb  1 21:07 sbin/
drwxr-xr-x 328 root root  12288 Jan 27 14:38 share/
drwxr-xr-x  11 root root   4096 Jan 17 19:32 src/

From this, one concludes that reported dir size is actually connected with number of subdir entries, and that default annotated size for empty dir is at least 4096 bytes. I believe that this is how ext4 (and similar), together with linux kernel, work.

What you want is probably something like 'Right click' on dir, and select Properties'.

I don't know how to do it globally in the 'File manager' you are mentioned, but in terminal it is:

$ du -d1 -h /usr
407M	./bin
1.3M	./games
5.9G	./local
31M	./include
3.6G	./share
15M	./sbin
328M	./src
3.2G	./lib
14G	.

or sorted version

$ du -d1 -h /usr | sort -h
1.3M	./games
15M	./sbin
31M	./include
328M	./src
407M	./bin
3.2G	./lib
3.6G	./share
5.9G	./local
14G	.

Last edited by iMBeCil (2017-02-01 21:23:13)


Postpone all your duties; if you die, you won't have to do them ..

Offline

#3 2017-02-01 22:05:57

doxa
Member
Registered: 2016-10-24
Posts: 32

Re: All Folders Display Same Size

Thank you for the reply. I would really like to figure out how to display the size in the File Manager.

Offline

#4 2017-02-01 22:24:40

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: All Folders Display Same Size

doxa wrote:

Thank you for the reply. I would really like to figure out how to display the size in the File Manager.

It is already displayed in thunar - look at the status bar at the bottom. This is also the same information shown if you r-click a directory and choose "Properties".

You could also configure a custom action for the r-click menu (although this pretty much duplicates the above). Use this command for the custom action...

size="$(du -h -c | grep total )" && number="$(ls -AR | wc -l)" && notify-send "Files" "$number files\n$size"

Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#5 2017-02-02 08:25:56

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: All Folders Display Same Size

each folder is actually a file, which takes up very little space on your filesystem, but the minimum filesystem block size (correct terminology?) is 4kB, so that's what the size of a folder is.

what you really want is the size of the folder content, which can be seen by right-click => properties

Offline

Board footer

Powered by FluxBB