I should explain a bit of Linux File System structure to explain this. Most linux file systems do something similar, but I assume ext4, which is the current default.
File System Structure
- inode is the basic block that the file system understands as a logical unit.
- A directory inode contains references to other inodes.
- A file inode contains the metadata, actual data, and references to continuation blocks, in case the file had to be stored in a non contiguous manner.
Links
- Ext4 supports two kinds of links. Hard and Soft.
- A hard link is a reference to inode directly. Each file has atleast one hard-link, from the directory it belongs to.
- Since a directory is just a inode, with information about group of inode references, it can reference itself, or a parent. In other words, a folder can be both child and parent to the same folder.
Okay, this may be getting confusing. Let me explain. Assume you have three folders, A,B,C as follows.
C is in B.
B is in A.
Now, the fun part is, C can point to the same inode as A, creating what is sometimes called a circular reference loop. If you try recursing, you will encounter a never ending loop.
- Soft links are ordinary files that record the directory path to their target location. They are just marked on the filesystem that instead of a line of text, they should be interpreted as a link to some other location. Nautilus, for example, creates soft links when you use its 'Create link'/'Link here' options.
So What?
Hence, trying to calculate sizes recursively has its quirks. It is a bad idea to try and compute sizes recursively by default. However, properties dialogs of all decent file managers I know show recursively calculated total sizes, because that is what an ordinary user expects.
Windows has no problem?
Actually, windows uses a different file system format called NTFS, which maintains a list of all files and their size. So it can always tell the total size easily.
Then why don't we use NTFS?
It does not support the Unix notion of permissions (rwx
for owner, group, and universe separately), and that single reason makes it unfit for use as a Linux file system. Ext4 brings a lot to the table that this minor inconvenience doesn't matter to many.
Alright. Gimme the size I need.
Did you try du
?
How does du
work?
du
stands for disk usage. It actually counts the inode blocks, taking care to not double-count them. Add up the sizes, and you have the total size.
TL;DR
Use du -hs <foldername>
to find the actual size of the folder on disk. Read man du
for more info.
Best Answer
Sorry, It seems Thunar does't have this functionality yet (I've exhaustively searched in Google and XFCE Documentation, there is no mentioning of this feature in official docs).
Thunar stores it's user configuration changes in
~/.config/Thunar/thunarrc
file. The options currently supported are listed here. You can see, there is no settings for shortening file name. These are some advanced settings which neither support it.I suggest you using nautilus. You can install it with
sudo apt-get install nautilus
.Alternatively, You can request a feature in by going to XFCE forum to implement this or even you can help them by your coding skill, if you want.
For more information, see thunar faq or visit Official documentation for thunar.