GNU/Linux: Filesize of symlink targets

Step-by-Step descriptions of how to do things.
Post Reply
User avatar
peter_b
Chatterbox
Posts: 371
Joined: Tue Nov 12, 2013 2:05 am

GNU/Linux: Filesize of symlink targets

Post 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 :)
Post Reply