du -sh shows incorrect size for directories with hard links

Solution Verified - Updated -

Issue

  • When running du -sh on directories that share hard links, the first directory shows the correct size while the other directories report a smaller size
  • du not accounting for hard links
  • du -sh showing wrong size calculations

Environment

  • Red Hat Enterprise Linux 6
  • Directories with numerous hard links

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content