Walter Schrabmair
Walter Schrabmair

Reputation: 1341

how to get total filesize of the files when only the links are availble

In Linux I have a directory with links to some files anywhere in the system. Now I would like to get the total filesize of these files where these links are referenced to. Can anyone here tell me how this is to be done? THanks

Upvotes: 2

Views: 49

Answers (1)

hnicke
hnicke

Reputation: 602

Use du -shL <dirname>. From the du manpage:

-L, --dereference
        dereference all symbolic links

Upvotes: 3

Related Questions