This is a test version of Biostars. For the public version, visit https://www.biostars.org.
size of a directory from symbolic link

I want to calculate the overall directory size (human readable) from a symbolic link I tried to google it but could not find command that may be used in Linux.

This directory is link to a backspace which achieve the files and leave the symbolic link. I understand if the directory is directly accessible then I can easily use du command.

Trust me this is not my home work but I get stuck and could not find on web the exact command.

Thanks

linux

Trust me this is not my home work

Thank you for getting that out of the way :)

1 answer

Try this:

du -hs `readlink -f yoursymlink`

(note the backtics)

Log in to answer this question.