Page 1 of 1

GNU/Linux: Filesize of symlink targets

Posted: Tue Oct 13, 2015 3:55 pm
by peter_b
If you want to know the size of files on your harddisk, you usually use the command "du" (disk usage).
In case, the target contains symbolic links, a plain "du -sh" won't actually tell you what you want.

Therefore, you need to de-reference the symbolic links to get the actual filesize of its target:

Code: Select all

$ du -shL
The "-L" parameter does the symlink-dereference work :)